Younis was batting on a well-set 65 and with him skipper Misbah-ul Haq had made a chancy 44 on a flat Sheikh Zayed Stadium pitch.
Younis, who scored 468 in the 2-0 win over Australia in a series which ended last week, has so far hit nine fours in his 94-ball knock.
Misbah survived two chances, one on 17 and the other on 20 as fielders failed to reach uppish shots with Ish Sodhi the luckless bowler on both occasions.
Just before lunch, Shehzad missed a bouncer from fast bowler Corey Anderson. It hit him on the side of the head and his bat struck the stumps for a hit-wicket dismissal.
Also Read
Dazed by the blow, he fell to the ground before walking off.
Before the bizarre dismissal, Shehzad had been shaping up well, with 17 fours and a six in his 371-ball innings.
Shehzad and Ali had put on 169 for the second wicket.
Ali missed a sharp turner from Sodhi and was bolwed. He hit four boundaries off 215 balls.
Shehzad, 126 overnight, took some time to open up today. But he then hit a straight six off Craig before running a three to surpass his previous best of 147 against Sri Lanka in Sharjah earlier this year.
Anderson has figures of 2-60 while Sodhi has taken 1-151.
The remaining two Tests will be played in Dubai (November 17-21) and Sharjah (November 26-30).