The explosion prompted the evacuation of some 2,000 people living near the Z121 military facility, around 120 kilometres (75 miles) north of Hanoi, police said, adding incident was yet to be brought under control.
"At least seven people have died and more are injured in the explosion," the official Vietnam News Agency reported, without providing details on the number of injured.
Residents in Thanh Ba district -- where the complex is located -- said they felt the ground shake in repeated explosions, the VNExpress news site reported.
"About 2,000 people around the Z121 factory have been evacuated," he added.
More From This Section
One local resident told AFP that locals have fled to the Viet Tri township, about 40 kilometres away, fearing further damage.
"We have received warnings from authorities that there could be further explosions which could be very destructive," he said, speaking on condition of anonymity.
No information on the cause of the explosion was immediately available.
In 2010, fireworks being prepared at Hanoi's My Dinh stadium for use in the city's 1000th anniversary celebrations exploded, killing three foreigners and one Vietnamese national.