The 40km jam stretched from Bangabandhu Bridge to Korotia.
Tangail Deputy Commissioner Md Shahidul Islam said the gridlock was created around 8am due to excessive pressure of vehicles.
After frantic effort of law enforcers and executive magistrates, the vehicles started to move slowly from 2pm.
Though some commuters were aggrieved because of the tailback, there was no report of any vandalism or untoward incident, he said.
Kashi Nath Majumdar, one of the stranded passengers, blamed the toll collection on the Bangabandhu Bridge for slowing down the pace of the vehicles.
A large number of commuters from the northern part of the country hit the road on Tuesday to spend the Eid-ul-Fitr vacation with their families.