The disease first detected in February has been hard to contain because there is no vaccine, said Pham Van Dong, head of the Animal Health Department.
"We have culled around 4.7 million pigs and, as you can see, the Ministry of Agriculture and Rural Development has confirmed that the outbreak has now spread to all 63 provinces and cities," Dong told Reuters.
Pork accounts for three-quarters of total meat consumption in Vietnam, a country of 96 million people where most of its farm-raised pigs are consumed domestically.
Vietnam's pig herd at end July was down 18.5 percent to 22.2 million pigs since December.
The pork industry is valued at 94 trillion dong ($4 billion) a year, or nearly 10 percent of the country's agricultural sector.
Farm hygiene is the best way to protect the pig herd, deputy agriculture minister Phung Duc Tien told the Ho Chi Minh City Law newspaper.
"Applying biosecurity in farming will help meet domestic demand for pork through the end of this year and help keep consumer prices under control," Tien was quoted as saying.
African swine fever was first detected in Asia last year in China, the world's largest pork producer. China's pig herd shrank by 32.2 percent in July from the same month a year ago.