Paul Makonda ordered police in the Kinondoni area of the main city, Dar es Salaam, to detain 20 workers after they turned up late for a meeting.
Mr Makonda said the officials had failed to explain their actions.
On Tuesday, newly-elected President John Magufuli replaced independence day celebrations with a clean-up campaign.
Wednesday’s failed meeting was rearranged on Thursday morning and the officers arrived two hours early.
The commissioner’s action has received widespread support among Tanzanians on social media.
However, human rights groups have criticised the move, saying rules and regulations need to be followed to avoid chaos.
“If someone does not show up for work, then we have to follow the laws and procedures we have,” Onesmo Olengurumwa, from the Tanzanian Human Rights Defenders’ Coalition, told the BBC.
But he added that they were in support of the efforts shown by the current president to ensure that everyone was held responsible.
The BBC’s Tulanana Bohela in Dar es Salaam says lateness and long tea breaks are a constant source of complaints from citizens seeking services from public offices.
The district commissioner may be seen as taking inspiration from the new president, who has the reputation of a no-nonsense, results-driven politician, she says.
Since coming to power last month, Mr Magufuli, nicknamed “The Bulldozer”, has announced a range of cost-cutting measures, including a ban on unnecessary foreign travel by government officials.