It was not immediately clear whether Mr Sharif, whom Gen Musharraf deposed in a bloodless 1999 coup, would get back before November 26, the last date for filing election nominations and so be able to run for parliament.
He was due to meet King Abdullah in Riyadh for a "farewell meeting" before flying to London, Mr Sharif's political base for the latter part of his exile, a Saudi government source said.
Gen Musharraf, under intense criticism at home and abroad for imposing emergency rule three weeks ago, had agreed to Mr Sharif's return during discussions with Saudi Arabia's King Abdullah, a leader of the ruling Pakistan Muslim League said.
Government officials were not immediately available for comment.
Overnight the Commonwealth suspended Pakistan's membership of the grouping of mostly former British colonies. The move underlined the pressure General Musharraf has been under since invoking emergency powers to shore up his presidency.
Western governments fear that stifling democracy could benefit Islamist militants threatening nuclear-armed Pakistan.
Politically isolated, Gen Musharraf paid a surprise visit to Riyadh on Tuesday, sparking speculation that he was reaching out to his old foe to strengthen his support base ahead of a January 8 general election.
Mr Sharif flew to Riyadh overnight from the Red Sea port of Jeddah, where he has stayed since the Pakistani authorities deported him after he tried ending his exile last September.
"God willing, he will return in a few days," said Raja Zafar-ul-Haq, chairman of the Nawaz League, as Mr Sharif's faction of the Pakistan Muslim League is known. A party spokesman said he was expected to return "within four or five days".
Diplomats say Saudi Arabia was embarrassed by its complicity in Mr Sharif's exile and had wanted the situation resolved. © 2007 Australian Broadcasting Corporation