In 1951, Muhammad Ali was appointed as the Finance Minister by Prime Minister K. Nazimuddin and was announced to be kept in the Finance ministry in Bogra's Talent ministry in 1953. On 11 August 1955, Muhammad Ali was appointed as the Prime Minister of Pakistan by then-Governor-General Iskandar Mirza, upon the dismissal of the Bogra's Talent administration. After taking oath from the Chief Justice M. Munir, Prime Minister Ali placed a great emphasis on drafting of the Constitution of Pakistan, and supported Bogra's One Unit scheme despite the opposition. He favored French architectMichel Ecochard over Greek architectConstantinos Doxiadis over the planning of new capital in 1955, though the project nonetheless went Doxiadis in 1960s. It was during his term when the first set of the Constitution of Pakistan was promulgated on 23 March 1956 where the nation-state was declared as Islamic Republic with a parliamentary form. His premiership was endorsed by President Iskandar Mirza and the three-party coalition government composing of Awami League, Muslim League and the Republican Party at the National Assembly. In 1955, Prime Minister Ali took over the party presidency. In July 1956, Muhammad Ali met with the Indian Prime MinisterJawahar Lal Nehru of India in an attempt to settle the key issue that was preventing the normalization of relations between Pakistan and India. This was the issue of Kashmir that had been divided between India and Pakistan in 1948. That issue remains unsettled to this day. Despite his feat, Prime Minister Muhammad Ali proved to be a poor politician who failed to maintain control over his party when he reached a compromise to dismissed the cabinet members of his own party in favor of appointing the cabinet composing of Republican Party and Awami League in 1955-56. After appointing Abdul Jabbar Khan as the Chief minister of West-Pakistan who subsequently helped in secret trading in favor of Republican Party that made the Republicans in majority in the National Assembly, the Muslim League demanded its president to investigate the matter but Prime Minister Ali refused to support the parliamentary resolution in the National Assembly by believing that "he was responsible only to the Cabinet and the Parliament, not the party." On 8 September 1956, the parliamentary leaders of the Muslim League under A.Q. Khan, successfully brought the motion of no confidence at the National Assembly that effectively removed him from the party's presidency. Despite support from President Mirza, Prime Minister Ali eventually resigned when Huseyn S. Suhrawardy gained support from the Muslim League for the premiership. After his resignation, Ali joined the National Bank as an advisor. He tried playing a role in national politics in the 1960s, but was ostracized by the Muslim League due to his political role played in 1950s. His son, Khalid Anwer, is a well-known lawyer and constitutional expert, who served as the Law and Justice minister in Sharif's administrations while his younger son is Dr. Amjad Ahsan Ali is well known medical doctor. In 1967, he wrote his memoirs and died due to a cardiac arrest on 2 December 1982 in estate in Karachi where he was buried.