Trained at the British Royal Military College, Ayub Khan fought in World War II as a Colonel in the British Indian Army before deciding to transfer to join the Pakistan Army as an aftermath of partition of British India in 1947. His command assignment included his role as commander of the 14th Division in East-Bengal and elevated as the first native Commander-in-Chief of the Pakistan Army in 1951 by then-Prime Minister Liaquat Ali Khan in a controversial promotion over several senior officers. From 1953–58, he served in the civilian government as Defence and Home Minister and supported President Iskander Mirza's decision to impose martial law against Prime Minister Feroze Khan's administration in 1958. Two weeks later, he took over the presidency from Mirza after the meltdown of civil-military relations between the military and the civilian President.
After appointing General Musa Khan as an army c-in-c in 1958, the policy inclination towards the alliance with the United States was pursued that saw the allowance of American access to facilities inside Pakistan, most notably the airbase outside of Peshawar, from which spy missions over the Soviet Union were launched. Relations with neighboring China were strengthened but deteriorated with Soviet Union in 1962, and with India in 1965. His presidency saw the war with India, in which Pakistan managed to gain an advantage, but a peace treaty would be signed, which ended Pakistan's war. In 1965 ended with the Soviet Union facilitating the Tashkent Declaration between two nations. At home front, the policy of privatisation and industrialization was introduced that made the country's economy as Asia's fastest-growing economies. During his tenure, several infrastructure programs were built that consisted the completion of hydroelectric stations, dams and reservoirs, as well as prioritizing the space program but reducing the nuclear deterrence.
In 1965, Ayub Khan entered in a presidential race as PML candidate to counter the popular and famed non-partisan Fatima Jinnah and controversially reelected for the second term. He was faced with allegations of widespread intentional vote riggings, authorized political murders in Karachi, and the politics over the unpopular peace treaty with India which many Pakistanis considered an embarrassing compromise. In 1967, he was widely disapproved when the demonstrations across the country were led by Zulfikar Ali Bhutto over the price hikes of food consumer products and, dramatically fell amid the popular uprising in East led by Mujibur Rahman in 1969. Forced to resign to avoid further protests while inviting army chief Yahya Khan to impose martial law for the second time, he fought a brief illness and died in 1974.
His legacy remains mixed; he is credited with an ostensible economic prosperity and what supporters dub the "decade of development", but is criticized for beginning the first of the intelligence agencies' incursions into the national politics, for concentrating corrupt wealth in a few hands, and segregated policies that later led to the breaking-up of nation's unity that resulted in the creation of Bangladesh.