Still searching for their first top-flight win of 2022, Crystal Palace looked good value for the majority of the game, but Thomas Tuchel's men found a way through when Marcos Alonso's tantalising cross found Ziyech at the back post.
The Moroccan had found the net earlier in the game, having swept up on a Romelu Lukaku rebound, but VAR intervened to keep the host's dreams of holding out alive.
In the opening exchanges of the game, it was the hosts who controlled the tempo, with Palace's midfield playing a vital role in their early dominance - bringing about the first chance of the game.
The Ivorian found his Fench teammate in an area of space, but Olise's following cross narrowly missed everyone in the box.
Chelsea, who had recently returned home from Club World Cup glory, had finally settled play down in the middle of the first half, with chances coming their way.
While the goal was open and the half in the taking for Hakim Ziyech, the Chelsea attacker failed to find anything but the net when the Moroccan was given the chance to lash a volley towards Vicente Guaita.
Crystal Palace, however, kept The Blues out, proving to be capable of matching every attack. While Guaita was forced to make two compelling saves, including one to keep Antonio Rudiger's 40-yard effort out of the top left corner, The Eagles showed resilience.
Ending the half as the better side, regaining their early momentum, Palace almost found the deadlock breaker in added time.
His resulting effort curled past the post and instead left the vocal Palace crowd in nothing but undying belief at the break.
The second period of the game started much as the first had ended, with the home side pushing for a goal, being the dominant team.
While Romelu Lukaku was pocketed by Joachim Andersen's exceptional defending, Palace's midfield kept up their label of being a thorn in Chelsea's side, moving the ball with pace and intent.
Next in line for an opportunity on goal would be Jeffrey Schlupp, who latched onto a ball after Olise and Zaha combined once more. But the Ghanaian's left-footed attempt flew into row Z of the Holmesdale End.
Palace certainly looked good value for an entertaining finish at Selhurst Park. So much so that it forced Tuchel to rethink the shape and condition of his team.
A triple substitution, which paved way for both midfielders being replaced for Chelsea, almost made an instant impact for the visitors.
Lukaku found room to manoeuvre for the first time in the game, and with just his seventh touch of the day, the Belgian fired a shot into the hands of Jack Butland.
Ziyech followed up with a rebound to open the scoring - only for VAR to intervene to the chorus of a bouncing Selhurst Park. It was a moment in the game that provided the backdrop of a grandstand finish.
Unfortunately for the home side, though, they would lose out to a soul-crushing winner from Hakim Ziyech in the dying embers. Marcos Alonso's perfect cross found the Moroccan at the back post before he wheeled away with his teammates.