It needed a late fightback to send them through to the third round after Derby had taken the lead against the run of play through Jason Knight's 51st minute goal.
Tom Barkhuizen and Daniel Johnson both came off the bench to score, Barkhuizen with a superbly-struck equaliser with 12 minutes remaining.
Then just into stoppage-time, Johnson netted from the penalty spot after a Darnell Fisher cross had been handled by Rams left-back Lee Buchanan.
Considering all the speculation surrounding DJ recently over Rangers' interest in him, it was a dramatic moment for the midfielder.
Neil said: "It was a good night, I thought we played well and deserved to win the game.
"We were the better side right the way through the match and the biggest disappointment was with their one attack they scored which for me was completely against the run of play.
"We had two golden opportunities in the first half which we didn't take and at our level you know it is sod's law that the one attack they do have it ends up in the back of the net.
"At that point it could have been quite easy for heads to go down and mope a little bit, but our reaction was excellent, we got on with it and rolled our sleeves up.
"The lads didn't think falling behind was justified and I agreed with that, they did something about it.
"I thought the subs coming on made a big impact and we got the win our performance deserved."
Derby played the last 35 minutes with 10 men after Mike Te Wierik was sent-off.
The centre-half was shown a straight red card for bringing down Sean Maguire when the striker was clear on goal - that coming soon after the home side had gone in front.
Neil responded to falling behind and Derby's red card by first introducing Barkhuizen, then bringing on Johnson and Scott Sinclair in a double change.
"When a side goes down to 10 men, a lot of pressure goes on to your team because they are expected to win," said Neil.
"What we did was open up the pitch really wide and we moved the ball from side to side.
"Along with patience you need tempo, you need to be assertive and move the ball really quickly..
"At times we didn't move it as quickly as I would have liked but when we did, that is when we created chances.
"We got the impact from the substitutes. Tom has been in good form in pre-season but Saturday was frustrating for him, we didn't get enough balls down the side for him.
"When you get Tom front facing and put the ball in front of him, he is a real threat.
"What he has added is quality goals, his two this season have been terrific. Let us hope that continues."
Turning to the impact made by Johnson, Neil was delighted to see have an influence.
Neil said: "I expected DJ to come on and impact the game, I expected him to have a good attitude and play the way he can.
"He didn't disappoint. I thought he was very assertive in his play, he switched the play well, he wanted the ball and when we got the penalty he put himself forward and stuck it away for us."
North End will be at home next week to the winners of Thursday's tie between Brighton and Portsmouth.