Chasing an improbable victory target of 451, Pakistan managed 343-3 when the teams agreed to pull up stumps at Dubai International Cricket Stadium with 13 overs remaining.
Pakistan surpassed its highest fourth-innings total of 341.
Younis and Misbah put on 186 runs, the highest partnership for the fourth wicket between the teams.
The innings was also a personal triumph for Younis after he was banned indefinitely by the Pakistan Cricket Board in March for infighting on the ill-fated tour of Australia.
The ban was lifted on appeal in June but he wasn't recalled to the team until this match — his first Test since July 2009 — and scored his 17th Test century.
Starting the day at 109-2, the overnight pair of Younis and Azhar Ali extended their partnership to 82 for the third wicket before Ali was bowled by Paul Harris for 63.
That wicket, 40 minutes before lunch, would be the Proteas' only success all day as Younis and Misbah slowly and steadily took control.
The duo had its share of luck as well. Younis was dropped early in the day by wicketkeeper Mark Boucher when he was on 16 and by Jacques Kallis at second slip on 70. The bowler on both occasions was Dale Steyn.
Misbah, playing his first Test since January, survived a failed catch by Hashim Amla at short leg when he was on 8 and could not keep Johan Botha's delivery down enough.
Both batsmen grew into their own after tea. Younis was especially severe on Botha, hitting him for all of his four sixes.
Younis reached his century in style with his third six over midwicket, and the hundred came in 223 balls with 13 boundaries and two sixes. Misbah, too, went in the same region off Botha to notch up his fifth half-century in 123 balls with six fours and one six.
