His predecessor President Mamnoon Hussain left the President House at completion of his five-year term on Saturday.
The oath-taking ceremony was attended by top civil-military brass including Prime Minister Khan and Army Chief Gen Qamar Javed Bajwa and foreign diplomats.
Alvi was active in the student movement during Field Marshal Ayub Khan's era in 1969. He was shot during a protest in Lahore and proudly carries a bullet in his right arm.
In 1979, he was a Jamaat-e-Islami (JI) candidate for the provincial assembly but elections did not take place.
He won the National Assembly elections from NA-247 (Karachi) during the July 25 polls. He was also elected member of the National Assembly in the 2013 general election.
In Pakistan, the President is considered as a symbol of the federation and head of the state and exercises all powers on the recommendations of the prime minister.
With his close ally Alvi as President, Khan can smoothly implement his agenda, according to observers.