A bouncer from fast bowler Shamar Springer proved to be too good for Azam as it hit him straight on the neck. The batter could not maintain his balance and while collapsing on the ground, his bat hit the stumps and he was dismissed hit wicket.
Azam looked in pain as the team physio quickly entered the ground and he was taken to the dressing room after some inspection.
Meanwhile, Khurram Shahzad took four wickets Sunday to leave Bangladesh battling to avoid the follow-on at 75-6 at lunch on the third day of the second Test in Rawalpindi.
Shahzad ripped through the top order with 4-15 and fellow quick bowler Mir Hamza took 2-29 as Bangladesh collapsed to 26-6 in reply to Pakistan's first innings 274 in the rain-affected match which saw Friday's first day washed out.
At the break, Mehidy Hasan Miraz was on 33 and Litton Das 13 as the pair fought to repair the innings with a dogged unbroken seventh-wicket stand worth 49.