Ole Gunnar Solskjaer’s side were taken to a nerve-jangling finale after the third-round tie ended 1-1.
Mason Greenwood scored his second goal in a week in normal time only for his second-half effort to be cancelled out by 16-year-old Luke Matheson. However, United’s Argentinian goalkeeper was the hero as he saved the League One side’s second penalty, taken by Jimmy Keohane, of the dramatic spot-kick contest.
United had a 100 per cent record from the spot as Juan Mata, Andreas Pereira, Fred and Greenwood all scored before Daniel James hit the clincher.
Axel Tuanzebe, who was brought up in Rochdale and was handed the captaincy for the night, had to be alert when Rochdale mounted the first attack of the night.