A Jason Koumas first-half free-kick took Cardiff into fifth place in the Championship and condemned Leeds to their second home defeat of the season.
Cardiff's Joe Ledley and Kevin Cooper forced early saves from Neil Sullivan, and Glenn Loovens hit the bar.
Sean Gregan then fouled Koumas outside the box and the Wales winger curled a superb shot into the bottom corner.
Ian Moore had an effort well saved and Rob Hulse headed wide in the last minute as Leeds chased an equaliser.
Leeds boss Kevin Blackwell:
"That was maybe our worst performance for two months.
"Collectively we were poor and we have let ourselves down. We were not creative enough or bright enough to beak them down."
Cardiff boss Dave Jones:
"We had a real scare because Neil [Cox] and Cameron [Jerome] were ill. Neil had been up all night and was worse than Cameron but he is an old pro and was determined to play.
"He held our back four together and it shows what a great character he is.
"We changed our system, we had been working on it all week and we caught Leeds on the hop."
Leeds: Sullivan, Kelly, Butler, Kilgallon, Harding (Pugh 56), Miller, Gregan (Douglas 69), Lewis, Healy, Hulse, Blake (Moore 76).
Subs Not Used: Bennett, Walton.
Booked: Gregan, Blake, Miller, Kelly.
Cardiff: Alexander, Weston, Loovens, Cox, Barker, Cooper (Ardley 84), Ledley, Whitley, Boland, Koumas, Jerome.
Subs Not Used: Lee, Parry, Mulryne, Margetson.
Booked: Cooper, Alexander.
Goals: Koumas 31.
Att: 20,597
Ref: G Sailsbury (Lancashire).