The museum, which once served as the residence for the Portuguese royal family, celebrated its 200-year anniversary earlier this year.
Aerial images broadcast on Brazilian television showed how the fire, which started in the evening after the facility had closed for the day, had spread throughout the building.
The full extent of the damage and cause of the fire is not yet known.
Brazil's President Michel Temer said in a tweet that it was a "sad day for all Brazilians" as "200 years of work, research and knowledge were lost".
In an interview with Brazil's TV Globo, the museum's director said it was a "cultural tragedy".
One member of staff told the network that project managers had had "tremendous difficulty" trying to secure funding for "sufficient" resources for the palace.
Another, librarian Edson Vargas da Silva, is quoted by local media describing the building, which he said had wooden floors and contained "a lot of things that burn very fast", such as paper documents.
The museum houses thousands of items related to the history of Brazil and other countries including Egyptian artefacts, according to its website.
Its natural history collection includes important dinosaur bones and a 12,000-year-old human skeleton of a woman - the oldest ever found in the Americas.
Among the South American artefacts in the collection are archaeological findings, fossils and meteorites.
Employees had reportedly previously expressed concern about funding cuts and the dilapidated state of the building.
The institution was established in 1818 as the Royal Museum with the aim of promoting scientific research by making its collection available to specialists.
More about: Brazil National-Museum Rio