The leader of the gang, Nguyen Van Phu, 54, and four of his henchmen aged 27-58 got death for "illegally trading and trafficking narcotics."
The four to get life for the same charges are aged 26-45.
Three others received jail sentences of five to 20 years.
According to the indictment, Phu frequently traveled to Cambodia as part of his job, and became acquainted with drug suppliers in the neighboring country.
He and his former jail associates, Nguyen Thi Be and Nguyen Hung Loc, then set up a gang to traffic drugs from Cambodia to Ho Chi Minh City.
The gang first appeared on the authorities’ radar when customs officers at Moc Bai Border Gate in the southern province of Tay Ninh caught Be and Loc trying to enter Vietnam with 2.1 kilograms (4.6 pounds) of heroin in 2015.
Be was later sentenced to death for drug trafficking, but Loc managed to escape and warn Phu, enabling him to evade arrest.
Phu was eventually tracked down in November 2015 after police arrested one of his buyers in Ho Chi Minh City's District 8 with 5.2 kg of heroin.
The buyer fingered Phu, and the police quickly arrested him and his gang.
Its associates in the north were arrested a few months later after police caught a gang member trafficking 17 kilograms of synthetic drugs from the northern port city of Hai Phong to a hotel in HCMC to meet Phu's men.
The gang had traded over 20 kg of heroin and 17 kg of synthetic drugs between March 2014 and January 2016, according to prosecutors.
Vietnam has some of the world’s toughest drug laws. Those convicted of possessing or smuggling more than 600 grams of heroin or cocaine or more than 2.5 kg of methamphetamine could face the death penalty.
The production or sale of 100 grams of heroin or 300 grams of other illegal narcotics is also punishable by death.