Tamim scored 109 and Imrul made a patient 130 as Bangladesh, hoping to sweep the series 3-0, cruised to 303-2 in their first innings at stumps on the opening day in the port city of Chittagong.
The duo put Bangladesh's highest opening partnership at 224, surpassing their own record of 185 against England at Lord's in 2010.
It was only the fifth century stand by a Bangladeshi opening pair, with Tamim and Imrul both featuring in three of them.
Masakadza himself removed Imrul later as the batsman slashed a catch to substitute fielder Vusi Sibanda at gully.
More From This Section
At stumps, Mominul Haque was unbeaten on 46 and Mohammad Mahmudullah was on five with Bangladesh set to build a huge first innings total.
Bangladesh had posted a tense three-wicket win in the first Test in Dhaka, before routing the tourists by 162 runs in the second match in Khulna last week.
Left-handed Tamim hit 14 boundaries and a six in his second consecutive century after making 109 in the second Test. He drew level with former captain Mohammad Ashraful's record tally of six centuries for Bangladesh.
But he was lucky to get past 19 as Brian Chari dropped a catch him at square-leg off leg-spinner Natsai M'shangwe.
The Test series between the two lowest-ranked teams will be followed by five one-day internationals.