Frank Lampard's side had drawn its previous three matches, including two outings without scoring, but found the right balance between attack and defence in Russia.
Callum Hudson-Odoi was gifted his first goal in the competition by a goalkeeping error from Matvey Safonov after Jorginho had earlier missed from the penalty spot for the second time this season.
Chelsea was given a scare when Yuri Gazinskiy's strike came back off the crossbar, but Timo Werner succeeded where Jorginho failed in converting from 12 yards out. Ziyech got off the mark to secure the result, while substitute Christian Pulisic added a late fourth.
Jorginho had sent Safonov the wrong way with his penalty after Werner was clipped by Kaio in the box, yet the ball ricocheted back off a post.
However, Chelsea was gifted a goal 23 minutes later as Hudson-Odoi cut inside Igor Smolnikov and fired a weak shot on target that squirmed through Safonov's grasp.
That goal forced Krasnodar to come out of their shell and they so nearly equalised 10 minutes into the second half, Gazinskiy hitting the bar with a volley.
Krasnodar was competing at home in UEFA's showpiece competition for the first time and again went close through Marcus Berg's effort, which Edouard Mendy was equal to.
But an unfortunate penalty decision against Aleksandr Martynovich - Pulisic's shot from point-blank range hitting the skipper's thigh and then his arm - allowed Werner to tuck home from the spot, five minutes after Jorginho had been substituted.
Chelsea went through the gears and had a third goal via Ziyech's crisp finish, with the fourth arriving in the final minute through Pulisic's shot from a tight angle.