The granting of independence to India in 1947 and the appointment of Arthur Creech Jones as Colonial Secretary gave a new window for Senanayake to push for his case using the new constitution that was recommended by the Soulbury Commission. In the negotiations that followed, the British government accepted Senanayake's proposals for constitutional change and self-rule. Senanayake presented the Soulbury Constitution to the State Council which voted it in with only three votes against it.
On September 24, 1947 he was invited by the Governor General of Ceylon Sir Henry Moore to form the island's first cabinet as its first Prime Minister. On 11 November 1947, Senanayake and Sir Henry signed agreements between Ceylon and Britain including a defence pact and public service agreements that paved the way for independence of Ceylon. The "Independence Bill of Ceylon" was passed in December 1947. On 4 February 1948, Ceylon marked its independence with a ceremonial opening of parliament.
In the early years of Senanayake's premiership he faced opposition and criticism from many of the leftist parties. He soon had difficulties with one of the strongest members of his cabinet and leader of the largest factions of his party, S. W. R. D. Bandaranaike. Bandaranaike joined his Sinhala Maha Sabha in forming the UNP in 1947 having given the impression that Senanayake would soon retire and he would succeed him. With no signs of Senanayake retiring and conflicts with Senanayake on hard line nationalist policies of he had, in 1951, Bandaranaike resigned from his posts and dissolved the Sinhala Maha Sabha and established the Sri Lanka Freedom Party (SLFP). Senanayake assumed the portfolio of Health and Local Government held by Bandaranaike and began countering his break in parliament for the next few months.