The two houses of parliament passed the bill last month to enable Musharraf to hold both the offices of president and of army chief.
Acting President Muhammad Mian Soomro, who is chairman of the upper house of parliament or Senate, signed the bill into law on Tuesday.
He did so in the absence of Musharraf, who is visiting Latin America, Information Minister Shaikh Rashid Ahmad said.
"The acting president has signed the bill," he said. "The president can now keep both offices."
Musharraf has said he has not yet taken a final decision on whether to quit as army chief, but experts say he could use the legislation as a legal justification to keep both positions.
Under a deal with an alliance of Islamic parties last year, Musharraf pledged to give up his military post by the end of 2004 in return for support for constitutional changes validating his rule and giving him extensive power.
"It is the darkest day in the political history of Pakistan. It is perhaps the last nail in the coffin of democracy in Pakistan"
Pakistan Peoples Party (PPP)
But he recently suggested he would not do so, saying quitting the army could undermine his authority in the "war on terror" as well as his ability to push forward a nascent peace process with arch-rival India.
Opposition groups denounced the signing of the bill and said it dealt a serious blow to democracy in Pakistan, which has been ruled by the military for more than half of the 57 years it has been an independent state.
"It is the darkest day in the political history of Pakistan," said Raza Rabbani, a senior leader of the Pakistan Peoples Party (PPP), led by exiled former prime minister Benazir Bhutto.
"It is perhaps the last nail in the coffin of democracy in Pakistan."
The signing of the bill came just three days after the main Islamic opposition began a public campaign to try to force Musharraf to quit the powerful army position.
The Alliance for Restoration of Democracy (ARD), a grouping made up of PPP and other secular parties, has also announced a protest plan.
The opposition wants Musharraf
to end his army role
The ARD will hold its first rally in the northwestern city of Peshawar on 5 December.
Despite ideological differences, the two alliances are trying to find common ground for a joint struggle against Musharraf.
But analysts say that the agitation by the opposition poses no immediate threat to Musharraf because the pro-military Pakistan Muslim League dominates parliament.
While Western countries have voiced concern over Musharraf's democratic credentials, criticism has been muted because of his role in helping Washington in its "war on terror".