Muhammad Ayub Khan was born in the village of Rehana near Haripur, in Hazara District. He was the first child of the second wife of Mir Dad Khan, who was a Risaldar Major in Hodson's Horse. According to Ayub, his father had the greatest influence on his character, outlook, and attitude towards life. For his basic education, he was enrolled in a school in Sarai Saleh, which was about 4 miles from his village. He used to go to school on a mule's back. Later he was shifted to a school in Haripur, where he started living with his grandmother.
As a child he was interested in playing kabaddi, gulli danda, marbles and hockey. After passing his Matriculation Examination in 1922, Ayub was sent to Aligarh University where he spent four years. However, before appearing in his B. A. exams, he was selected for the Royal Military College at Sandhurst. He sailed for England in 1926.
Ayub's performance in Sandhurst was exemplary and he won several scholarships. After the completion of training, he got commissioned in the Indian Army in 1928. He fought at different fronts during World War II, first as a Major and then Colonel. During the communal riots of 1947, he was assigned to assist General Pete Rees in the Punjab Boundary Force. At the time of Independence, Ayub Khan opted to join the Pakistan Army, where as a Brigadier, he was the senior-most Muslim officer. In 1951, he was raised to the status of a four-star General and was appointed as the first local Commander-in-Chief of the Pakistan Army.
The first time military was directly involved in politics of the country was when Ayub Khan, a serving Commander-in-Chief, was inducted into Muhammad Ali Bogra's Federal Cabinet in 1954, and was given the portfolio of Defense. As Commander-in-Chief and Defense Minister, Ayub Khan played a key role in negotiations concerning Pakistan's entry into United States' sponsored military alliances, C. E. N. T. O. and S. E. A. T. O. On October 7, 1958, Iskander Mirza enforced the first Martial Law in Pakistan with the help of Ayub Khan. Ayub Khan was designated as the Chief Martial Law Administrator. However, the two leaders couldn't work together for long. Ayub Khan snatched away Mirzas' powers and assumed charge as the President of Pakistan, in addition to his role as Chief Martial Law Administrator. Later on he gave himself the rank of Field Marshal.
Most people in Pakistan welcomed Ayub Khan's takeover because they were sick and tired of the political instability that had racked the country since its birth in 1947. Immediately after assuming his new responsibilities, Ayub tried to wipeout corruption and get rid of several social problems the country was facing. All these steps enhanced Ayub's popularity among the masses. However, he was conscious of the fact that he could not rule under military cover for long and thus appointed a Constitutional Commission headed by Justice Shahab-ud-din. On Ayub's instructions, the report presented by the Commission on May 6, 1961, was examined by many committees, modified, and was finally given the shape of a Constitution.