Chelsea struggled to get going until late on, and it had looked as though they were heading for another away defeat after Victor Camarasa’s delicate finish early in the second half put the Bluebirds ahead.
The introduction of Eden Hazard and Loftus-Cheek off the bench in the second half injected new life into the team and two headed goals in the closing stages did the damage.
Cesar Azpilicueta’s first of the season levelled for Chelsea, with six minutes to play, although Neil Warnock and his players were livid the offside flag had not been raised.
Then came Loftus-Cheek’s winner as the clock ticked past 90, a powerful header planted into the corner. It was a smash-and-grab, but after recent difficulties away from school, it was a very welcome three points for the blues.
FT CARDIFF 1:2 CHELSEA
Chelsea (4-3-3): Kepa; Azpilicueta (c), Rudiger, David Luiz, Alonso; Barkley, Jorginho (Loftus-Cheek 64), Kovacic; Pedro (Hazard 53), Higuain (Giroud 77), Willian.
Unused subs Caballero, Christensen, Kante, Hudson-Odoi.
Scorers Azpilicueta 84, Loftus-Cheek 90+1
Booked Jorginho 26, Azpilicueta 61, Rudiger 87
Cardiff (4-2-3-1): Etheridge; Peltier, Morrison (c), Manga, Bennett; Gunnarsson, Arter (Ralls 80); Murphy (Mendez-Laing 90), Camarasa, Hoilett; Niasse (Zohore 85).
Unused subs Murphy, Bacuna, Harris, De Cordova-Reid.
Scorer Camarasa 47
Booked Arter 54, Gunnarson 86