Nottingham Forest 1-2 Cardiff City
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."