Chasing a target of 268, Pakistan was bowled out 163 on Tuesday with Nahid registering a career-best 5-40 in a stellar display.
In a three-over burst after tea, he dismissed Saud Shakeel, Mohammad Rizwan and Noman Ali in 18 balls, conceding just five runs.
Fellow fast bowler Taskin took 2-40, and gave Bangladesh the first breakthrough when Imam-ul-Haq edged behind for two.
Two debutants - Azan Awais and Abdullah Fazal - stood firm in a repeat of their first innings resistance, sharing 54 runs.
Off-spinner Mehidy Hasan, however, produced an arm-ball to baffle Awais, who made 15 following his first innings 103.
Nahid was slightly erratic in his first spell but got into the act with the wicket of captain Shan Masood, leaving Pakistan 3-68.
Fazal steadied the innings with Salman Agha, but Bangladesh bounced back after the tea break with two wickets in quick succession.
Left-arm spinner Taijul Islam broke through with the wicket of Fazal (66), ending a 51-run partnership before Taskin claimed Salman (21) with a back-of-length delivery with Pakistan at 5-121.
Shakeel and Rizwan gave Pakistan hope again but Nahid returned for his fiery spell with three wickets in three overs. He then wrapped up the Pakistan innings and completed his second five-for by dismissing Shaheen Shah Afridi.
Earlier, skipper Najmul Hossain Shanto hit 87 as Bangladesh set Pakistan 268 for victory on Day 5. Bangladesh declared its second innings at 9-240 after resuming the day at 3-152, with an overall lead of 179 runs.
The hosts showed an aggressive intent to set a challenging target with Shanto leading from the front.
After losing Mushfiqur Rahim early to the bowling of Hasan Ali, Shanto struck seven boundaries in his knock before being trapped lbw by left-arm spinner Noman Ali (3-76).
The second Test in Sylte starts on Saturday.