Pakistan skipper scored exactly 100 for his first hundred against South Africa to take Pakistan to 429-8 at tea in reply to South Africa's first innings total of 249.
Zulfiqar Babar was run out for two in the last over before tea. Adnan Akmal was unbeaten on 22 as Pakistan stretched their lead to 180 with two wickets intact.
Misbah was finally trapped leg-before by paceman Dale Steyn who was wicketless until after 23rd over.
Steyn's pace partner Vernon Philander was the pick of the bowlers with 3-75.
At 39 years and 141 days, Misbah became the oldest Pakistani batsman to score a Test hundred. He is also the oldest to notch a Test hundred since England's Graham Gooch reached three-figure mark, against New Zealand at Nottingham in 1994 at the age of 40 years 314 days.
England's Jack Hobbs holds the record for oldest Test centurion at 46 years and 82 days when he scored a hundred against Australia in 1929.