Ireland produced a solid batting display after opting to bat first, driven by aggressive starts from skipper Paul Stirling (29 off 14) and Tim Tector (38 off 25).
Wicketkeeper Lorcan Tucker anchored the middle overs with a well-made 41 off 32, taking Ireland to a competitive 170 for 6.
Mahedi Hasan was the standout, claiming 3 for 25, including crucial breakthroughs in the middle overs.
Tanzim Hasan Sakib and Saifuddin picked up a wicket each, while fielding lapses allowed a few extra runs late on.
Chasing 171, Bangladesh got off to a confident start thanks to Parvez Hossain Emon, who smashed 43 off 28 with flair.
Captain Litton Das then took charge, steering the innings with a brilliant 57 off 37, keeping the hosts firmly in the chase.
Despite losing wickets at regular intervals after the halfway mark, Bangladesh maintained control of the required rate.
Ireland fought back through Mark Adair (2/36) and Gareth Delany (2/28), triggering a mini-collapse that left Bangladesh needing composure in the final overs.
That came from Saifuddin, who played a decisive cameo, 17 off 7 balls, including clean hits under pressure.
Mahedi Hasan (6* off 3) finished the job as Bangladesh reached 174/6 in 19.4 overs, sealing victory with two balls to spare.
The third and final T20I now becomes a series decider, promising a thrilling finish in Chattogram.