Derby goalkeeper Scott Carson saved Phil Jones' penalty as the Championship club won 8-7 on penalties to knock Manchester United out of the Carabao Cup at Old Trafford.
In an incident-packed third-round tie, United took the lead through Juan Mata's first goal in nine months.
Harry Wilson - on loan from Liverpool - equalised with a dipping free-kick from 30 yards at Old Trafford.
United goalkeeper Sergio Romero, making his first appearance of the season, was sent off for handball before Jack Marriott's header put Derby 2-1 ahead.
United substitute Marouane Fellaini's 95th-minute header sent the tie to a dramatic shootout.