Pakistan captain Azhar Ali continued his good run with the bat as the openers raised 91 runs for the opening stand.
Bangladesh seized their opportunity after Azhar Ali's wicket as Pakistan, after being 181 for 2 in the 35th over, lost their way. Eventually, Pakistan lost their last eight wickets for 47 runs.
Bangladesh spinner Arafat Sunny was at the forefront of Bangladesh's resurgence, taking two wickets as they pegged Pakistan back with regular strikes.
Azhar Ali continued on to compile a maiden ODI century, off just 111 balls before he was out bowled by Shakib Al Hasan for 101.
After losing the three-match ODI series 2-0, Pakistan began the third and final ODI on a bright note with opener Sami Aslam impressing on debut, scoring 45 runs.
Junaid Khan was the only successful bowler for Pakistan, getting rid of Tamim and Mahmudullah.
A 97-run stand for the third wicket was enough to take Bangladesh through by eight wickets, giving the side a 3-0 series whitewash achieved after they reached their target with more than 10 overs to spare.
Tamim Iqbal, who scored centuries in the first two matches, played second fiddle to Sarkar but scored a brisk 64 in the third game.
If Pakistan were off to a good start, Bangladesh got an ever better one thanks to openers Tamim Iqbal and Soumya Sarkar, who added 145 runs for the opening wicket.
It was a landmark series for Bangladesh, who hadn't beaten Pakistan since the 1999 World Cup, to put it past them thrice in the series, and rather comfortably.
Soumya Sarkar, however, was determined to carry on and he reached his first century in ODI cricket. His previous highest in nine ODIs had been 51.