After a match of few chances, and with penalties looking on the cards, Miller headed home from close range to send Nigel Clough's men into the fifth round.
United are the lowest ranked team left in the cup and their victory meant Fulham's miserable season reached a new low.
Bottom of the Premier League and four points adrift of safety after a 3-0 home defeat to Southampton, Fulham boss Rene Meulensteen spoke in the programme of using the fourth round replay as a chance to "garner some confidence".
If all else failed, the Fulham head coach asked for "togetherness and desire" - something lacking for the most part as Clough's visitors forgot their own relegation worries to reach the fifth round.
Substitute Miller stooped to score the last-gasp winner for a side sitting 23rd in League 1, setting up a home clash with the winners of the replay between Preston and Nottingham Forest.
This was by no means as impressive as the third-round win at Aston Villa, but one which the vocal Blades support will hope can spur them onto better things in the league.
The first half was a turgid affair in which few chances were created, with the main talking point referee Neil Swarbrick's decision not to send off Bob Harris despite a late tackle on Josh Passley shortly after being booked for a foul on the same player.
Harris, whose loan move from Blackpool was made permanent on transfer deadline day, was back at the heart of things when play resumed for the second half, curling a free-kick wide before hitting a powerful effort at David Stockdale.
The natives were getting restless as Fulham's disjointed performance continued, rounding on Hugo Rodallega when the ineffective striker was taken off with 30 minutes remaining.
The Colombian looked distraught and sat with his head in his hands on the Fulham bench after being taken off, with Brede Hangeland blocking a fierce Stefan Scougall effort as matters on the pitch continued.
Howard had to react quickly to push away a deflected Duff cross as Fulham pushed for a winner, before Muamer Tankovic showed good feet to wriggle free and strike wide.
Stockdale flapped at a John Brayford cross and Pajtim Kasami sent an impressive effort just over as play swung from end-to-end, while substitute Jose Baxter was proving a nuisance for the Fulham backline.
Dempsey saw an acrobatic effort blocked and penalty appeals waved away as the Whites continued to press, although they were unable to prevent the match going to extra time.
Unsurprisingly that too did little to warm the spirits of the 10,139 fans on a wet and windy night at Craven Cottage.
The first period involved much of the same aimless to-ing and fro-ing, aside from a moment of class from Brayford.
Collecting the ball just inside the Fulham half, the on-loan Cardiff man burst forward at speed, cut in-between two men and forced Stockdale into a fine save low to his right.
Kasami twice came close in the second half of extra time, fizzing just wide before testing Howard, and, just as it looked like penalties, United grabbed victory.
Baxter sent in a corner from the right, which was headed back across home by Maguire and glanced home by substitute Miller, on in the 97th minute for the injured Scougall, in the last minute of extra time.