Khan, who is the chairman of the Pakistan Tehreek-e-Insaf (PTI), received 176 votes while his only rival and the Pakistan Muslim League-Nawaz (PML-N) chief Sharif got 96 votes.
Votes secured by Imran Khan are the same as were polled by the party candidate for election of the Speaker.
Politicians in Pakistan's lower house of parliament have elected former cricket legend Imran Khan as the country's new Prime Minister, paving the way for him to form a coalition government.
The prime minister-in-waiting had himself called his Indian counterparts to extend a personal invitation.
PTI chief Imran Khan.
Talking to media upon arrival at the Parliament House, former federal minister Ahsan Iqbal said PML-N's mandate was snatched in July 25 elections.
The Pakistan People's Party (PPP), the third largest party in the House that joined the PML-N and others in an opposition alliance, withdrew its support for Sharif's candidacy as premier days before the election and abstained from voting.
In a house of 342, the winning candidate was required to obtain at least 172 votes to become the Prime Minister.
However, one of the parties - the PPP party of assassinated ex-Prime Minister Benazir Bhutto - is now reported to have chose to abstain from the vote.