Pakistan has been suspended from the Commonwealth because of its imposition of emergency rule, the organisation has announced after a meeting in Uganda.
Musharraf has faced international fire over the state of emergency
Secretary General Don McKinnon said Pakistan was being suspended "pending restoration of democracy and the rule of law".
Pakistan has criticised the decision as "unreasonable and unjustified".
Earlier Pakistan's Supreme Court dismissed a legal challenge to Pervez Musharraf's re-election as president.
The president has said that would allow him to step down as head of the army.
In recent days Gen Musharraf's regime has also released more than 3,400 people who had been detained under the emergency rule which the president imposed earlier this month.
And following a visit by US envoy John Negroponte, opposition leader Imran Khan was freed.
But the Commonwealth Ministerial Action Group (CMAG), the group reviewing the status of Pakistan's membership, decided that despite these changes, not enough had been done.
The BBC's Peter Biles in Kampala says that some Asian nations had reportedly resisted the suspension.
The decision was not put to a vote, our correspondent says, but after a day of fraught negotiations an agreement was eventually reached.
Mr McKinnon said the 53-member Commonwealth had reached the decision by consensus.
"CMAG agreed that notwithstanding some progress by the Pakistan government since its last meeting, the situation in Pakistan continued to represent a serious violation of the Commonwealth's fundamental values," Mr McKinnon said, reading from a statement.
Pakistan's foreign ministry has said the suspension was "unreasonable and unjustified".
The ministry said that the Commonwealth had failed to appreciate Pakistan's "serious internal crisis".
Pakistan's ambassador to Washington Mahmud Ali Durrani told the BBC the government regretted the decision.
He said the authorities were committed to lifting the state of emergency as soon as possible, but that would be done according to Pakistan's timetable, not under threat from outside powers.
It is the second time that Pakistan has been expelled from the Commonwealth. The country was suspended in 1999, after Gen Musharraf seized power in a coup.
It was reinstated in 2004.
As in 1999, Pakistan will now be banned from attending the organisation's meetings and taking part in the Commonwealth Games.
Though in diplomatic terms being suspended has little impact, our correspondent in Kampala says that being a member does open doors, and as Mr McKinnon was keen to point out, just a year after its last suspension Pakistan was voicing a desire to return.
Britain's Foreign Secretary David Miliband said the "decision was taken in sorrow, not in anger", and that he hoped the group would be able to welcome Pakistan back soon.
"We're all clear that the choice is for Pakistan now, to make the changes that are in its interest nationally and internationally, and then to re-enter the Commonwealth as a proud and valued member," Mr Miliband added.
Progress will now be reviewed after parliamentary elections which Gen Musharraf has promised will take place in January.
Ten days ago Commonwealth foreign ministers from the bloc gave Pakistan 10 days to lift its emergency rule or face suspension.
They also said Gen Musharraf had to step down as army chief, release political detainees and restore press freedoms.
Judges and lawyers have held a series of protests in Islamabad
Gen Musharraf imposed the state of emergency and suspended Pakistan's constitution on 3 November. He later defended his decision, saying that he had taken the "in the national interest".
He said Pakistan was in a crisis caused by militant violence and a judiciary which had paralysed the government.
Pakistan has been engulfed in political upheaval in recent months, and the security forces have suffered a series of blows from pro-Taleban militants opposed to Gen Musharraf's support for the US-led "war on terror".
In a lengthy televised speech on the night of 3 November, Mr Musharraf said the situation was threatening Pakistan's sovereignty and had forced him into making "some very painful decisions".