Maurizio Sarri’s side took the lead in the opening five minutes after Fikayo Tomori, on loan from the Blues, scored an own goal.
Jack Marriott grabbed an equaliser four minutes after before another own goal, this time from Richard Keogh, put the home team ahead again.
But Martyn Waghorn converted from Mason Mount’s cross, another star on-loan from Chelsea, before Cesc Fabregas’ strike before half-time proved to be the winner.
The Rams gave the Premier League giants a scare after already beating Manchester United in the previous round to set up the tie.
And Lampard revealed the Chelsea stars and staff were full of praise for his Championship outfit.
Lampard received a hero’s welcome after returning to the club where made his name.
“We really contributed to the night, this is a fantastic Chelsea team and we competed,” he said.
“Of course they are going to control the game and maybe have more of the ball. But we gifted them two goals and wasted a lot of chances.
“The pride of the evening overshadows [those mistakes]. I think we deserved a draw but I’m not upset at all. It makes me happy.
“Talking to the Chelsea players and some of their staff after the game, they were all praising us and saying how good we were.
“I’m so proud of my Derby County players.”
The 40-year-old received a hero’s welcome after returning to the club where he is their all-time highest goalscorer.
And he said: “I’m so thankful to the Chelsea fans. They know how I feel about them.
“I’ve got nothing but 13 years of great memories at this place. I come back and they act like that. I can only thank them and the Derby fans as well.
“I’m a lucky man to get an evening like that. I thank everybody.”