The hosts made light of the 296-run deficit in the first innings as they posted a mammoth 555 for six in their second knock before the match was called off after tea on the fifth and final day.
The draw was a morale-booster for Bangladesh, who had lost all their eight previous Tests against Pakistan, ahead of the second and final match starting in Dhaka next Wednesday.
A stalemate was always on the cards on the heart-breaking pitch for bowlers at the Sheikh Abu Naser stadium which produced 1,515 runs for the loss of just 26 wickets over the five days.
The home team's batting assault left Pakistan still searching for their first win on the tour after being whitewashed 3-0 in the one-dayers and also losing the Twenty20 international.
The huge lead was wiped off by a record 312-run opening stand between left-handers Tamim and Imrul Kayes, which was Bangladesh's highest-ever partnership for any wicket.
Kayes was dismissed for 150 in the morning session, holing out in the deep against left-arm spinner Zulfiqar Babar after striking 16 boundaries and three sixes.
That shot helped him surpass current captain Mushfiqur Rahim's 200 against Sri Lanka in Galle in 2013, which was the previous best Test score by a Bangladeshi batsman.
Tamim hit 17 boundaries and seven sixes before he was stumped off Hafeez just before tea attempting another big hit.
But Pakistan's misery in the field continued after Tamim's departure as star all-rounder Shakib Al Hasan stepped in to hit an unbeaten 76.
Rahim, who had sat out the entire fourth day's play due to a finger injury, failed to open his account when he padded up to Hafeez and was declared leg-before.
Spinners Shah (0-123) and Babar (1-125) were the most expensive of the seven bowlers used by Pakistan to contain the flow of runs.
