Second-half goals from Peter Whittingham and Craig Noone gave Cardiff their first away win of the season at Millwall.
Whittingham had a first-half free-kick disallowed before he broke the deadlock with a superb 20-yard effort on 53 minutes.
Two minutes later Noone opened his account with a well taken goal from close range.
Millwall's James Henry saw his first-half free-kick saved by David Marshall.
Defeat at The Den leaves Kenny Jackett's side fourth from bottom of the Championship while Cardiff remain fifth, a point behind leaders Blackburn Rovers.
The victory was Cardiff's third successive win but their evening was marred by an injury to Nicky Maynard, who was stretchered off in the second half.
Despite losing 4-1 at Hull City, Millwall's side showed only one change with Alan Dunne in for the injured Paul Robinson.
Cardiff boss Malky Mackay also made a single change with Aron Gunnarsson replacing fellow Icelander Heidar Helguson while Craig Bellamy was rested.
Looking to make amends for the defeat at Hull, the home side started brightly.
James Henry's shot was blocked by Andrew Taylor before Nadjim Abdou's effort from inside the box was well saved by Marshall.
But Cardiff slowly got to grips with the game and they had the ball in the back of the net on 20 minutes when Whittingham's free-kick beat Maik Taylor.
Millwall v Cardiff facts
Prior to the match, Cardiff had only registered one win in 12 league matches against the Lions - a 2-1 win in September 2010 at Cardiff City Stadium
But Whittingham was denied his fifth goal of the season as his effort was disallowed after referee Simon Hooper ruled that Gunnarsson had infringed in the build-up to the free kick.
Jordon Mutch and Maynard both saw efforts go wide while at the other end Karleigh Osborne went close.
And Cardiff keeper Marshall was forced to parry Henry's free-kick as Millwall finished a goalless first half strongly.
The deadlock was broken by Cardiff seven minutes after the interval and it was Whittingham who finally scored in spectacular fashion.
Cardiff's leading scorer found the top corner with a curled effort from 20 yards after receiving the ball from Noone.
Within two minutes the visitors had doubled their lead when Tommy Smith played in Noone and the former Brighton man fired past Taylor for his first Cardiff goal.
Cardiff were dealt a blow when Maynard suffered what appeared to be a serious knee injury which resulted in the ex-West Ham player being stretchered off.
Smith twice went close to extending Cardiff's lead while Noone's shot from the edge of the area was saved by Taylor.
Millwall introduced new loan signing Chris Wood during the second half but apart from a long-range Henry effort they could not prevent Cardiff from securing their first away win of the season.
Cardiff City manager Malky Mackay:
"This is a tough place to come. I've never had an easy game here and for us to score two goals again and keep another clean sheet away from home I was delighted with.
"I thought we scored a goal early in the first half, the free-kick. I could see nothing wrong with it.
"But it didn't unsettle us and we kept going and I thought second half we certainly came out playing some good stuff.
"I think the two pieces of quality calmed everything down and really settled the game."
- 33 M Taylor
- 02 Dunne Booked
- 12 Lowry Booked
- 27 Osborne
- 28 Malone
- 04 Wright (C Taylor - 57' )
- 06 Trotter
- 14 Henry (Batt - 79' )
- 26 Abdou
- 07 Henderson (Wood - 57' )
- 20 Keogh
- 01 Forde
- 03 Shittu
- 24 Goodman
- 08 Racon
- 19 C Taylor
- 11 Batt
- 39 Wood
- 01 Marshall
- 02 McNaughton Booked
- 03 Taylor
- 05 Hudson
- 12 Connolly
- 07 Whittingham
- 16 Noone (Kim Bo-Kyung - 80' )
- 17 Gunnarsson
- 18 Mutch
- 14 Smith Booked
- 23 Maynard (Helguson - 67' )
- 32 Lewis
- 31 Nugent
- 08 Cowie
- 13 Kim Bo-Kyung
- 09 Velikonja
- 20 Mason
- 22 Helguson