The new constitution replaces an interim one that was supposed to be in effect for only a couple of years but has governed the nation since 2007.
Thousands of people who gathered outside the assembly hall cheered after the announcement was made, waving the national flag as fireworks went off.
In the streets of Kathmandu, the capital, people lit oil lamps and candles and buildings were decorated with colored lights.
"Congratulations to all Nepalese" read a white and red banner strung across a street.
"This really long chapter is now finally closed," said Shyam Sharma, a student who watched the president's motorcade drive toward the assembly. "Now the country can focus on other important issues like developing the country, improving the economy. If these politicians had agreed a few years back, we would not have wasted so much time, energy and money."
The key part of the constitution, passed on Wednesday after a decade of bickering and violent protests, sets the country up as a secular federation of seven states, each with a legislature and chief minister.
However, some ethnic and religious groups say lawmakers ignored their concerns over how state borders should be defined. They want more states, including ethnically based ones, bigger territory for larger groups and more seats for ethnic minorities in parliament and government.