However, Twente levelled the scores almost immediately when Joachim Andersen bundled the ball past Hidde Jurjus from a corner.
The home side came within inches of the lead in the early stages of the second half when Jerson Cabral launched an effort at goal from outside the box, but his strike hit the post.
Jari Oosterwijk should have fired Twente ahead when he was played through on goal, but Jurjus made a vital save for the visitors to deny the forward's strike with his body.
The hosts continued to press for a winner despite their numerical disadvantage and were rewarded in the 92nd minute as Ziyech found the net with a shot from close range to secure the three points.
Twente's win leaves them in 16th place, while De Graafschap are rooted to the foot of the table.