Fountains of high lava burst from Mount Nyiragongo into the night sky forming a thick red cloud over the town of Goma, which has a population of two million.
The lava flow reached the city’s airport but has reportedly now stopped.
The volcano, located 10km (six miles) from Goma, last erupted in 2002 killing 250 people and making 120,000 homeless.
During the early hours of Sunday, many residents headed across the nearby Rwandan border, while others went to higher grounds to the west of the city.
Crowds were seen with mattresses and other belongings, fleeing even before the government’s announcement, which came several hours after the eruption started.
Rwandan authorities said about 3,000 people had officially crossed from Goma. The country’s state media said they would be accommodated in schools and places of worship.
One Goma resident, Richard Bahati, said he was in his house when he heard screaming. “I got out and saw the sky was red. I am so worried, so worried. I lived through the problem with this volcano in 2002. The volcano devastated all our homes and possessions. That’s why I’m scared again this time.”
“Everyone is afraid, people are running away. We really don’t know what to do,” local man Zacharie Paluku told the Associated Press news agency.
Electricity was out across large areas, and one highway that connects Goma with the city of Beni was engulfed by the lava. There were also reports of earthquakes.
“There is a smell of sulphur. In the distance you can see giant flames coming out of the mountain,” resident Carine Mbala told AFP news agency.
An official from Virunga National Park, where the volcano is located, said in a note to staff that the eruption was similar to the one in 2002 and that everyone near the airport should “evacuate without delay”.
Communications Minister Patrick Muyay said on Twitter that the government was discussing “urgent measures” after the prime minister convened an emergency meeting in the capital, Kinshasa.
In a later update, Mr Muyay said the intensity of the lava flow had slowed and an assessment of the humanitarian situation was ongoing.
The UN peacekeeping mission in the country, Monusco, said it was carrying out reconnaissance flights over the city.
Mount Nyiragongo is one of the world’s more active volcanoes but there were concerns that its activity had not been properly observed by the Goma Volcano Observatory, since the World Bank cut funding amid allegations of corruption.
In a report on 10 May, the observatory warned that seismic activity at Nyiragongo had increased.
The volcano’s deadliest eruption happened in 1977, when more than 600 people died.