Sharif visited the Pakistan Tehrik-e-Insaf chief at Shaukat Khanum Hospital, where he is recuperating after fracturing his spine in a fall at a campaign meeting days before the May 11 general elections.
Sharif inquired about Khan's health and spent some time with him.
Talking to reporters after the meeting, Sharif said: "We have reconciled and I have asked Khan sahab to get well and play a friendly match with me."
He said he had a brief but "very good" discussion with a "receptive" Khan.
Sharif said he had asked Khan to let go of his anger as the Prophet Mohammed had once said that a person should not hold a grudge against anyone for more than three days.
He said that he and Khan respected each other's mandate.
"Imran is recovering fast and he told me that his pain is reducing. I congratulated him and he congratulated me over the election victories."
Sharif said he did not want anything for himself as "we have to collectively work to steer the country out of crises."
He added, "I will develop a good working relationship with Imran Khan. Imran was receptive to my gestures and we had a meeting in a cordial atmosphere."
In response to a question, Sharif said he wanted good relations with all countries, including the US.
Khan, 60, mounted virulent attacks on Nawaz Sharif and his brother Shahbaz Sharif while campaigning in Punjab.
Shortly after it became clear on Sunday that the PML-N was set to win the polls, Sharif said, without naming Khan, that he forgave everyone who had abused him during the campaign.
The former cricketer has been bed-ridden in hospital since May 7, when he fell off a fork-lift during a campaign meeting. As a gesture of goodwill, Sharif suspended his campaign for 24 hours after Khan's accident.
In a video issued after it became clear that the Pakistan Tehrik-e-Insaf had not performed very well in the polls, Khan did not acknowledge the PML-N's victory or congratulate Sharif.