Sheffield United 2 Burnley 3
The Bramall Lane outfit, who have lost at home to Reading and Wolves, had no answer to ex-Manchester United winger Chris Eagles, who ran the show and scored Burnley's third.
It was their first win at Bramall Lane for 35 years as they look forward to a mouthwatering semi-final clash with Spurs.
Burnley, without the suspended Clarke Carlisle, had to make last minute change after full-back Michael Duff was injured in the warm up with Steven Thompson stepping off the bench.
And they looked in further trouble in the third minute when Greg Halford's long throw was flicked on by Chris Morgan to Billy Sharp, who finished from close range before the little striker's goal was ruled out for offside.
Burnley caught United on the break with Thompson picking out Joey Gudjonsson, whose hurried shot from 15 yards ballooned over the top.
Eagles tried his luck with a strike from 25 yards with the ball flashing inches wide of the near post.
But the former Manchester United winger was in trouble minutes later when he was caught in possession by Gary Naysmith.
His pass found Sharp, who drilled the ball the wrong side of the woodwork.
The Sheffield side, with just one win from their previous four games, benefited from another Halford long throw.
The ball was cleared to Stephen Quinn who was lurking on the edge of the area and his left-foot shot was smothered on the line by the diving Brian Jensen.
Burnley took the lead in the 19th minute with United keeper Paddy Kenny at fault.
Robbie Blake's corner was headed towards goal by Thompson and as Kenny dithered, the ball was steered over the line by Martin Paterson.
Eagles squandered a chance by casually firing wide from 12 yards before United were back on level terms in the 35th minute.
Sharp was upended in the area by Jensen as he chased a Matthew Spring pass with the Burnley defence looking for an offside flag.
Jensen escaped a booking as Beattie went through his familiar spot-kick routine to tuck the ball into the left-hand corner of the net for his 10th of the season.
The Lancashire side nosed in front again three minutes before the break when Naysmith clipped the heels of Eagles inside the box and full-back Graham Alexander finished clinically from the penalty spot.
Eagles, proving a handful for Naysmith on the right flank, fired in a hat-trick of shots in quick succession from outside the area but all of them were scooped up by Kenny.
The impressive Eagles killed off United's tame challenge five minutes later after cleverly squeezing past substitute David Cottrerill and full-back Kyle Naughton to beat the exposed Kenny with a right-foot angled shot from 16 yards.
Quinn grabbed United's second four minutes from time after curling in a free-kick from the edge of the area to give the Sheffield side a lifeline.
Beattie then saw his fierce strike snatched on the line by Jensen in a nail-biting finish.