Deputy Interior Minister Pereira Silima told the BBC the truck was on its way to Malawi, a key staging point for refugees trying to reach South Africa to flee drought and conflict in Somalia and Ethiopia.
Silima said the migrants had set off from Ethiopia in two trucks but were transferred into one vehicle in the Tanzanian town of Arusha.
Survivors said the driver stopped the vehicle after suspecting there was a problem.
"When he found out that at least 41 were dead, he released the survivors and dumped the dead in the bush" before he drove off, Silima said.
Nearby villagers who came to the aid of survivors said one of the survivors later died bringing the death toll to 42. The cause of death was asphyxiation
Authorities were trying to locate the truck and the driver, Silima said.
Puzzle-maker slips 'Murdoch Is Evil' into Rupert Murdoch's Sunday Telegraph
Wisconsin business offering 'therapeutic cuddling' forced to close