He needed 15 runs to reach the milestone when starting the day's play on 53, but was frustrated for half an hour as play was delayed by a wet outfield before Bangladesh resumed on 318-3.
Mushfiqur reached the mark when he nudged Asitha Fernando towards fine-leg for two runs, to cheers from a sparse crowd at the Zahur Ahmed Chowdhury Stadium.
Mushfiqur's team-mate Tamim Iqbal could have pipped him to 5,000 Test runs on the third day, but retired hurt on 133 -- 19 runs short.
Liton, who replaced Tamim at the crease and had been unbeaten on 54 overnight, batted with ease and has scored 10 fours so far after occupying the crease for 188 balls.
Sri Lanka chose to review when a leg-before appeal against Liton on 84 off Ramesh Mendis was turned down, but technology confirmed the on-field umpire's decision that the ball was missing leg stump.