Afridi congratulated Pakistan on the victory and said the side needs to carry the winning momentum.
"Congratulations Pakistan!! A bit too close for comfort at the end. Great to see the team maintain winning ways, so important for a team to carry on the winning momentum," Afridi tweeted.
The former Pakistan skipper also pointed out that Bangladesh "desperately" need better pitches if they want to improve as a team.
"Bangladesh really need to do some soul searching, do they want to win on such pitches and give ordinary performances abroad and in World Cups? They have great talent and passion for the game but desperately need better pitches if they want to progress," Afridi tweeted.
With this win, Pakistan won the three-match series 3-0 and now both teams will square off in a two-match Test series, beginning on Friday in Chattogram.