Mushfiq glanced his 270th delivery, beating the diving fielder at fine leg, to bring up the ton with a boundary on the fourth day of the match on Wednesday.
Before lunch, Mushfiq had reached another milestone – becoming the first Bangladeshi batsman to earn 5,000 runs in Test cricket.
In 2015, Tamim Iqbal broke Habibul Bashar’s record of 3,026 runs to become the Tigers’ leading scorer in the format. Since then, Tamim and Mushfiq have swapped the record several times.
Tamim scored 133 on the third day of the Test before he retired hurt, just 19 short of the landmark.
Mushfiq started Wednesday just 15 runs shy of the goal and took 48 balls to reach it.
Mushfiq has had the longest career in international cricket in Bangladesh's history and is now playing in his 81st Test match.
At the end of 155 overs, Bangladesh stood at 436/6, leading Sri Lanka by 39 runs.
Nayeem Hasan, who picked up six wickets in Sri Lanka’s first innings, was batting alongside Mushfiq.
Sri Lanka’s Kasun Rajitha started the post-lunch session on a high, picking up the scalps of Litton Das (88) and a returning Tamim with the first two deliveries.
Asitha Fernando also picked up the wicket of Shakib Al Hasan (26).
Sri Lanka scored 397 in the first innings, powered by a 199 from Angelo Mathews.