The region, home to around 35 million people or more than a third of the country's population, has accounted for most of the country’s daily new Covid-19 cases of around 5,000.
HCMC and the industrial provinces of Binh Duong and Dong Nai began social distancing late last month or early this month while the 16 others, including the entire Mekong Delta, began a two-week social distancing campaign on Monday.
The quarantine order is one of Hanoi's toughest measures yet to curb the spread of the coronavirus. Earlier those entering from Covid-hit areas only needed to self-isolate themselves for 14 days.
Thousands are now entering Hanoi every day, posing a risk of causing new Covid clusters. On July 19 for instance around 1,300 people flew in from HCMC and 3,000 came from Da Nang by road alone, according to official statistics.
The administration has instructed the city Department of Health to create the capacity to quarantine around 50,000 people, prioritizing outer areas.
Hanoi has had 761 infections since the fourth wave began in late April.
It now urges people not to go out except to buy food or medicines or for emergencies. It has banned gatherings of more than five in public places.