The Clarets' hopes of advancing to the knock-out stages of the Premier League Cup were ended with defeat in South Wales.
Youth-team striker Tommy Wood gave Burnley a first-half lead at the Cardiff City Stadium.
But a Jamie Veale penalty and a goal from James Waite after the break saw Craig Bellamy's Cardiff side take the points to collect a first win and leave Burnley bottom of Group B.
Victory in their final group game against leaders Sunderland later this month will not be enough for Michael Jolley's side to gain a top-two spot and a place in the last 16 of the competition.
Burnley took an early lead against the Bluebirds as Wood pounced first following a corner to smash the ball home from close range.
Minutes later the Clarets could have been two up as Jimmy Dunne rose highest from a free-kick to connect with a header which blocked on the line before Rhys Abbruzzesse cleared the danger.
Tommy Wood put the Clarets in front
Jolley's youthful side were dominating the opening stages of the game and when Tristan Jumeau found time and space in the area, he hit an effort on goal which forced former Manchester United stopper Ben Amos into a terrific save.
Cardiff's first chance of the game came asVeale's free kick hit the bar from just outside the area.
City came close again minutes later when full-back Cameron Coxe broke through on goal before firing at Burnley keeper Conor Mitchell, who held the ball well.
Jumeau was gifted another opportunity just before the break but Amos denied the winger again to keep the score at 1-0.
The Clarets started the second half on the front foot and were again inches away from grabbing a second as Dan Agyei broke through the Bluebird's defence before firing just over.
The home side were then handed a penalty for handball and captain Veale stepped up and slammed home the equaliser.
And with 15 minutes to go, Cardiff took the lead through winger Waite, who slotted in from close range after receiving a great pass from Marco Weymans.
Although the Clarets fought until the end, pushing for an equaliser, they couldn't find a way through as a cup run that began with a qualifying-round win over Bournemouth in August effectively came to an end.
Burnley: Mitchell, Olomewewe, Dunne, Trialist, Wilson (Koiki 73), Birch, Thomas (Yao 80), Jumeau (Chakwana 68), McNeil, Wood, Agyei.