Mahmudullah hit an unbeaten 150 in the first innings of Harare Test.
According to a report in ESPNcricinfo, Mahmudullah disclosed his decision shortly after the end of the third day's play.
WATCH - Muzarabani and Taskin get into a scuffle in the one-off Test
His decision also shocked the Bangladesh Cricket Board (BCB) chairman Nazmul Hassan, who said Mahmudullah’s announcement will negatively affect the team in the middle of the game.
"I have not been informed officially but someone called me on the phone and said he doesn't want to play Tests anymore," Hassan told the Bengali daily Prothom Alo, as reported by ESPNcricinfo.
"Apparently, he told the dressing room. I think it is highly unusual, since the match isn't even over. I think he did it from emotion. Such an announcement will have a negative impact on the team. It is unacceptable. I have no problem if someone doesn't want to play, but there is no need to create a mess in the middle of a series," he added.
Featuring in his 50th Test, Mahmudullah hit an unbeaten 150 in Bangladesh’s first innings to take the team to 468/10. He was involved in a 138-run partnership for the seventh wicket with Liton Das (95) and then forged a 191-run stand with Taskin Ahmed (75) after the visitors were reeling at 132/6.
In response, the hosts got bundled out for 276, conceding a massive 192-run lead.
Batting in the second innings, Bangladesh scored 45/0 at the close of play on Day 3, extending their overall lead to 237 runs.