Shaun Miller headed a dramatic winner for the third-tier club just a minute before the end of extra time of a particularly dour contest in the rain at Craven Cottage.
United, which claimed its second Premier League scalp of the campaign after knocking out Aston Villa in the third round, is second from bottom in League One.
But the difference in status hardly showed as the visitors fought for every ball and created the better chances against a Fulham side that is bottom of the Premier League and on its second manager of the season in Rene Meulensteen.
With the match looking destined for a penalty shootout, Miller reacted quickly to glance home Harry Maguire's header across goal, giving the Fulham keeper no chance.
Nigel Clough's team will now play either Nottingham Forest or Preston North End, who meet in another replay on Wednesday, in the fifth round.
"If you hang on in there at 0-0 you've always got that opportunity," Clough said. "A remarkable effort again by the players tonight."
Meulensteen made no excuses for his side's failure to break through United's well-organized defence.
"It is very disappointing. It is as bad as the weather — the result, the outcome, the performance," he said. "That sums it up. It was a poor night all-round."