Match ends, Nottingham Forest 1, Cardiff City 2.
Eoin Doyle took his goal total for the season to 30 as 10-man Cardiff finished in the top half of the Championship with victory at Nottingham Forest.
Midfielder Joe Ralls volleyed the Bluebirds in front.
Doyle, who arrived from League One side Chesterfield for £1m in February, then headed in a second at the far post.
But Cardiff keeper David Marshall was sent off for pushing his head into the face of Jamaal Lascelles, before Dexter Blackstock pulled one back.
The Scotland international's red card for violent conduct means that he is set to miss the first three matches of next season.
But Forest, who led the Championship in September, were unable to save a point as they extended their winless run to eight games and finished 14th.
It was the first time Cardiff, who end the season in 11th, have won successive league games since the end of November.
Ralls, who passed a late fitness test on a knock to play, opened the scoring after Joe Mason's shot had been blocked.
Dublin-born Doyle, brought in for around £1m by boss Russell Slade, appears to be settling in with the Bluebirds after scoring just once in his first 12 games for the club.
The 27-year-old striker, who scored two penalties in last Saturday's 3-2 win over relegated Blackpool, found space amid Forest's defenders to convert Matthew Kennedy's cross midway through the first half.
Cardiff had to survive a couple of scares after captain Marshall was sent off, with substitute keeper Simon Moore saving well from Blackstock, and Ben Turner clearing off the line to deny Michael Mancienne.
Blackstock turned in Jamie Paterson's cross at the far post in stoppage time, but Cardiff held on.
Nottingham Forest manager Dougie Freedman: "We gave ourselves a mountain to climb and we have a lot of work to do over the summer.
"Analysing this game, we gave ourselves too much work to do in that first half-hour.
"I want to thank fans for their support, because their backing gave us some urgency and momentum in the final 20 minutes, which we needed."
Cardiff manager Russell Slade: "We have a growing unity and togetherness within this group, we want to maintain that and also kick on and strengthen the squad in the summer.
"Hopefully we will get the financial backing to do that, so that we can build again next season.
"Forest are in a similar position. I am sure they will be looking to build on what they have done, having made a flying start when Dougie first came into the club."
- 17KaneBooked at 66mins
- 16LascellesBooked at 41mins
- 10LansburyBooked at 76mins
- 22GardnerSubstituted forAkpomat 45'minutes
- 27BurkeSubstituted forOsbornat 69'minutes
- 18AntonioBooked at 45minsSubstituted forPatersonat 59'minutes
- 29de Vries
- 1MarshallBooked at 76mins
- 2PeltierBooked at 16mins
- 3da Silva
- 30KennedySubstituted forPilkingtonat 73'minutes
- 17GunnarssonBooked at 57mins
- 24MasonSubstituted forMooreat 77'minutes
- 13DoyleSubstituted forRevellat 73'minutes
- 40K Harris
- Peter Bankes
- Shots on Target
Second Half ends, Nottingham Forest 1, Cardiff City 2.
Attempt missed. David Vaughan (Nottingham Forest) left footed shot from outside the box misses to the left. Assisted by Henri Lansbury.
Attempt missed. Todd Kane (Nottingham Forest) left footed shot from outside the box is close, but misses to the left. Assisted by Ben Osborn.
Goal! Nottingham Forest 1, Cardiff City 2. Dexter Blackstock (Nottingham Forest) left footed shot from the right side of the six yard box to the top right corner. Assisted by Jamie Paterson with a cross.
Attempt missed. Jamie Paterson (Nottingham Forest) right footed shot from outside the box misses to the right. Assisted by Chuba Akpom.
Attempt blocked. Michael Mancienne (Nottingham Forest) right footed shot from the left side of the box is blocked. Assisted by Todd Kane with a cross.
Attempt saved. Dexter Blackstock (Nottingham Forest) right footed shot from the right side of the box is saved in the centre of the goal. Assisted by Ben Osborn with a through ball.
Substitution, Cardiff City. Simon Moore replaces Joe Mason.
Henri Lansbury (Nottingham Forest) is shown the yellow card.
David Marshall (Cardiff City) is shown the red card for fighting.
Foul by Jack Hobbs (Nottingham Forest).
David Marshall (Cardiff City) wins a free kick in the defensive half.
Corner, Nottingham Forest. Conceded by Aron Gunnarsson.
Todd Kane (Nottingham Forest) wins a free kick on the right wing.
Foul by Fabio (Cardiff City).
Corner, Cardiff City. Conceded by Jamaal Lascelles.
Attempt missed. Stuart O'Keefe (Cardiff City) right footed shot from outside the box misses to the left. Assisted by Anthony Pilkington.
Substitution, Cardiff City. Alex Revell replaces Eoin Doyle.
Substitution, Cardiff City. Anthony Pilkington replaces Matthew Kennedy.