United keeper Sam Slocombe was kept busy in the early stages, saving from Will Hughes and Theo Robinson. The opening goal eventually came on the half-hour mark when Richard Keogh rose highest to head home Michael Jacobs's corner.
This lead was doubled just four minutes later as Jake Buxton met another set piece at the back post. The Rams then scored their third goal in 10 minutes just before half-time when Robinson converted after being found by Jacobs's flick.
Andy Barcham pulled one back for Scunthorpe at the start of the second half, weaving his way into the box before slotting his shot past Frank Fielding. However, just a minute later Buxton once again nodded in a Jacobs cross to restore the three-goal lead.
Scunthorpe refused to give up, however, and Mike Grella gave them a glimmer of hope with 20 minutes left as he fired his shot in off the post.
Just a few minutes later, Derby were awarded a penalty when Keogh was brought down, but Robinson's spot kick was well saved and the League One side took full advantage by pulling it back to 4-3 courtesy of Grella's second.
Nathan Tyson netted 10 minutes from time to make it 5-3, allowing Derby to think that they had secured a second round spot when they entered injury time with the same lead.
However, Connor Jennings scrambled his effort in from close range to make it 5-4 with a minute of injury time left on the club before Jacobs conceded a penalty, allowing Bobby Grant to complete a stunning comeback and send the game into extra time.
Extra time was quieter than the 90 minutes of drama that had preceeded it, with half-chances for both sides but no goals as the match went to penalties.
Both sides missed two of their five spot kicks, meaning that the shoot-out entered sudden death, and it was Derby's Tom Naylor who missed the crucial penalty on the ninth time around.