The 79-run win in Dhaka gave Bangladesh a 1-0 lead in the three-match series and their second victory in the 50-over format against Pakistan. The minnows also defeated them in Northampton during the 1999 World Cup in England.
Tamim (132) and Mushfiqur (106) added 178 in 130 balls for the third wicket as Bangladesh recovered from a sluggish start to post their highest ODI total of 329-6 after winning the toss and opting to bat first against a new look Pakistan side.
In reply, the visitors were bowled out for 250 in the 46th over, despite half-centuries from Azhar Ali (72), debutant Mohammad Rizwan (67) and Haris Sohail (51).
Azhar, who replaced the retired Misbah-ul-Haq as Pakistan's new ODI captain, would have been delighted with the performance of his bowlers in the first 20 overs as Bangladesh limped to 67 for two.
But Tamim, who scored his first ODI hundred since March 2013, and former captain Mushfiqur, whose 77-ball knock contained 13 fours and two sixes, turned the momentum in Bangladesh's favour with their record stand - the highest for any wicket for the side in the 50-over format.
With some of their first-choice bowlers ruled out with injuries before the start of the series, Pakistan had high hopes of off-spinner Saeed Ajmal, who has returned to international cricket after remodelling his illegal bowling action.
Ajmal bowled well for his first five overs, giving away only 11 runs, but ended with figures of 0-74 from his 10, his worst figures in ODIs.
Left-arm paceman Wahab Riaz, who was impressive during the recent 50-over World Cup in Australia and New Zealand, was once again the pick of the Pakistan bowlers with figures of 4-59.
Azhar, playing his first ODI in two years, gave Pakistan a strong start, putting on 53 with Sarfraz Ahmed for the opening wicket and then 89 with Haris Sohail for the third.
But after his dismissal to fast bowler Taskin Ahmed in the 28th over, Pakistan kept losing wickets at regular intervals and the required run rate climbed steeply.
Taskin and left-arm spinner Arafat Sunny took three wickets each for Bangladesh.
Original source: Bangladesh beat Pakistan at last