Ireland were bowled out for 292 soon after resuming on the fourth day and Mushfiqur top-scored for the hosts with seven fours from his 51 runs.
Opener Tamim Iqbal made 31 and put on 62 runs with Mushfiqur for the third wicket after Ireland saw a glimmer of hope with two crucial early wickets.
Liton Das gave Bangladesh a positive start but poor fortune saw him bowled for 23 as a Mark Adair bouncer struck him off the helmet and fell to his stumps, dislodging the bails.
Three overs later, Najmul Hossain was caught by Andy Balbirnie at slip off Andy McBrine after making just four runs.
Najmul was initially declared not out by the on-field umpires but replays confirmed a fair catch to leave Ireland jubilant and Bangladesh reduced to 43-2.
But Mushfiqur and Tamim denied the visitors further success, taking Bangladesh to 89-2 by lunch.
Ben White dismissed Tamim after the break but Mominul Haque remained on 20 alongside Mushfiqur to take Bangladesh home.
Bangladesh also had pacer Ebadot Hossain to thank when his two wickets wrapped up Ireland's innings at 292 runs.
The tourists added just six runs to their overnight 286-8 after Ebadot forced last man Graham Hume to give a catch behind the stumps for 14.
McBrine added just one run to his overnight 71 to give Ebadot a finish of 3-37.
The visitors were staring down the prospect of an innings defeat on Thursday before debutant Lorcan Tucker became Ireland's second test centurion with 108.
Kevin O'Brien is the only other Irishman to hit a test century, scoring 118 against Pakistan during their maiden test in 2018.
Harry Tector added 56 to lift Ireland from a precarious 13-4 and surmount a 155-run first innings deficit.
The visitors were all out for 214 runs in their first innings and Bangladesh posted 369 runs in response.
Mushfiqur put the hosts in the box seat on the second day with his first innings knock of 126.
This week's test extends Ireland's losing streak in the five-day format. They have now lost all four tests they have played since becoming a full member of the International Cricket Council in 2017.
Ireland next head to Sri Lanka where they will play two tests in Galle, the first match beginning on April 16.