"All the privileges enjoyed by the king and royal family will automatically come to an end," the declaration says, noting that May 29 will from now on be celebrated as "Republic Day".
Near the convention centre in the capital where the assembly met, thousands of demonstrators gathered, some chanting "Long live the republic".
Pushpa Kamal Dahal, 53, popularly known as Prachanda, is the leader of the Communist Party of Nepal (Maoist) or CPN.
Prachanda was brought up in Nepal's Chitwan district and was born in 1954.
Born into a high-caste but poor farming family, Prachanda was driven to politics by the extreme poverty he witnessed in rural Nepal.
His interest grew in the communist groups that emerged in Nepal during the late 1960s after the king (Gyanendra's father) banned political parties.
In 1986, Prachanda became general secretary of the CPN.
He also led the People's Liberation Army, the military wing of CPN. Prachanda launched CPN's Nepalese People's War on February 13, 1996, which killed thousands of Nepalis.
In 1990, he went undergound and pursued a decade of armed struggle.
He announced a ceasefire and signed up to peace in 2006, that lasted 90 days.
He has had trouble losing his image as a man of war.
His immediate family members are active in Maoist politics, with his wife and daughter holding seats in the constituent assembly.
Now the most powerful man in Nepal, he is set to lead a new government.
Prachanda is the face of a "New Nepal," a popular Maoist slogan.
While the celebrations were largely joyous and peaceful, police at one point used tear gas to disperse a crowd that gathered too close to the building.
Two small explosions hit Kathmandu on Wednesday and several other small-scale bombings have occurred over the past three days, as tensions mounted ahead of the vote.
The political parties had long made it clear that their first act would be to declare Nepal a republic and do away with the 239-year-old dynasty.
The Maoist group, which won the largest single bloc of seats in the assembly in elections in April, fought for 10 years to oust King Gyanendra and create a republic.
"We have a big responsibility now," Girija Prasad Koirala, Nepal's prime minister, said in a short address before the vote to abolish the monarchy.
"We have come a long way, crossing lots of obstacles and hurdles to enter a new era. Our dream has come true, I think the nation's dream has come true."
Gyanendra has been generally unpopular with Nepal's public.
Already his face has been erased from Nepal's currency, and all his state allowances and benefits will be stopped from Wednesday.
"There is a sense of jubilation ... it's a very exciting moment for Nepal," Subina Shrestha, reporting for Al Jazeera from Kathmandu, said.
"From now on the monarchy are going to be normal citizens in Nepal."
Gyanendra has made no comment on his plans for the future.
Meanwhile, the flag of the Shah dynasty has been taken down from the main palace in Kathmandu, which will now be converted into a national museum.
"The royal flag was replaced by Nepal's national flag inside the palace," a palace official said on Thursday.
"The flag has been changed as part of the government decision to implement a republic."
Apr 1990: King Birendra, under pressure from the pro-Democracy movement, lifts 1960 ban on political parties.
Nov 1990: King proclaims a new constitution establishing a multi party democracy under a constitutional monarchy.
1996: Maoists launch an armed rebellion from remote Himalayan foothills to try to topple the monarchy.
Jun 2001: King Birendra and most members of the royal family are killed by then crown prince Dipendra, who also dies. Prince Gyanendra becomes king.
Feb 2005: King Gyanendra takes absolute power vowing to crush the Maoists.
Apr 2006: King Gyanendra gives up absolute power after widespread protests. Koirala, sworn in as prime minister, invites the Maoists for talks.
Nov 2006: Prime Minister GP Koirala and rebel chief Prachanda sign a peace deal, ending a war that killed more than 13,000 people.
2007: The ruling alliance and the Maoists agree to abolish the monarchy after elections.
Apr 2008: Nepalis vote in historic constituent assembly elections in which Maoists emerge as the largest political party.
May 2008: Special assembly, elected in April, agrees to abolish the monarchy to make Nepal a republic.
Kanak Dixit, editor of Himal magazine, told Al Jazeera: "The king of Nepal and his family are now commoners and citizens.
"Prachanda [the leader of the Maoists] is in all probability ... going to be the next prime minister.
"The Maoists, through the elections of April 10, have been completely legitimised as a force ... a unique situation where within two years an ... insurgency has been converted into a legitimate force.
However, "the democratisation of the Communist party of Nepal Maoists is still something that is in progress."
Dixit said that in the days ahead, there will be exhilaration in the streets of Nepal for the elections just conducted as well as for a monarchy that has just been abolished.
He said the monarchy "has played around with politics of Nepal and played in the murky waters for all the modern era of Nepal, that stretches back to 1950".
"However, there is some concern about how the Maoists with their violent past, and to some extent their violent present, will convert themselves now that they have been given legitimacy by the vote," Dixit said.
"Given that Maoists will have the responsibilities of power, because till now they were essentially an outside force, now they are very much the establishment of Nepal."
Spoken for peace
Ban Ki-moon, UN secretary-general, has welcomed the constituent assembly's decision, saying the Nepalese "have clearly spoken for peace and change".
The US, which continues to list the Maoists as a foreign "terrorist" organisation, urged "forward political developments" in Nepal, Tom Casey, the US state department spokesman, said in Washington.
Dixit, the magazine editor, said: "The international community, including India, have had no choice but to accept the verdict of the people of Nepal which gives the Maoists - not the majority - [but] 37 per cent in the constituent assembly house of 601 members.
"To that extent the Maoists have been given a very calibrated vote by the people of Nepal to make them completely responsible yet not to give the entire assembly lock stock and barrel to them."