Former opposition leader Sharif, 70, is set to serve as Prime Minister until the next general election, expected in 2023.
He was elected by Pakistan's parliament after former cricket star Khan was dismissed as Prime Minister in a no-confidence vote that had threatened to set off a constitutional crisis. For weeks Sharif had been leading a campaign to remove Khan over allegations of poor governance and economic mismanagement.
Sharif's rise has been mired in political conflict, and critics say he now faces the daunting task of reviving a flailing economy and maintaining important relations with key countries against the backdrop of widespread protests in favor of Khan.
"It has been a historic (few weeks), with our young and fragile democracy being tested to its very limit," said Hassan Kamal Wattoo, a lawyer and columnist based in the capital, Islamabad. "What we can only hope is at the end of this constitutional crisis, our democracy is left shaken but standing."
Who is Shehbaz Sharif?
A steel dynasty scion, Shehbaz Sharif is the younger brother of Nawaz Sharif, a three-time former Pakistani prime minister. The family's fortune derives largely from the Ittefaq Group steelmaker co-founded by their industrialist father, Muhammad Sharif.
Shehbaz Sharif first rose to power as the chief minister of Pakistan's politically important and most populous province of Punjab in 1997, and was praised by many in the province for his good governance.
But his term was cut unexpectedly short in 1999 when former Gen. Pervez Musharraf led a military coup against his elder brother, due in part to a breakdown of relations between the government and the powerful military. Shehbaz Sharif was briefly imprisoned in Pakistan, before going into self-imposed exile in Saudi Arabia with his family.
He returned to Pakistan in 2007, and was reelected chief minister of Punjab the following year. His tenure proved popular with many in Punjab for its ambitious infrastructure projects, and advances in education and industry.