While the Morocco star got what was the winner in the first leg of the playoff tie, his teammate and Cameroon goalkeeper Andre Onana made couple of breathtaking saves at the other end of the pitch to limit the visitors’ control on the game.
Donny van de Beek got the hosts to a perfect start - as early as the second minute, no thanks to Denys Boyko questionable goalkeeping.
But after showing quick reflex to deny Dynamo a lead, Onana was beaten in the 16th minute as Tomasz Kedziora got onto the end of a rebound off a header he had saved - off the resulting corner kick.
Ajax retook the lead through Ziyech whose effort took a huge deflection on its way past Boyko.
Before the break, summer signing from Southampton, Dusan Tadic completed the hosts’ superb first-half display converting a teasing Nicolas Tagliafico cross to make it 3-1.
Erik ten Hag’s men will play the reverse fixture in Ukraine next Tuesday, hoping to secure a result that would ensure them passage into the group stages of European elite club competition for the first time since 2014-15.