Pakistan bowled out Zimbabwe for 176 and magnified the advantage by reaching 103 without loss in reply.
Ali and Afridi bowled with discipline, while the hosts didn’t apply themselves well enough on a good batting pitch with soft dismissals.
Ali, who varied his deliveries admirably, set the tone for Pakistan before lunch by making Zimbabwe opener Kevin Kasuza play onto his stumps on 14, and stand-in skipper Brendan Taylor edge to the slips on 5 while chasing a wide delivery. Reduced to 30-4, Zimbabwe limped to lunch on 59-4.
After lunch, debutant Roy Kaia fell for 48 when Ali trapped him with a yorker after bombarding the newcomer with short-pitched balls. The other Zimbabwe batsman making his debut, Milton Shumba, was run out for 27. The newcomers combined for a team-best 59-run stand.
Pakistan T20 ratings v Zimbabwe
Regis Chakabva was Ali's fourth wicket when he edged a full delivery on 19 to third slip.
The much quicker Afridi removed the other opener, Prince Masvaure, to a catch in the slips, and wiped out the tail clean-bowling the last three — Tendai Chisoro (9), Blessing Muzarabani (14), and Richard Ngarava (1) just before tea.
Afridi had 4-43 and Ali 4-53.
In reply, openers Abid Ali (56 not out) and Imran Butt (43 not out) looked assured on a placid wicket and will seek to give their side a big first-innings lead when play resumes on the second day.
Zimbabwe, already missing three experienced players for the two-Test series, saw captain Sean Williams fail to recover from a soft-tissue injury on the eve of the match.
Pakistan handed a debut to bowling all-rounder Sajid Khan.