But Lampard put the Blues back in front on the hour and Salomon Kalou completed the scoring 10 minutes later.
Victory over Huddersfield gave Chelsea a lift at the beginning of what coach Avram Grant believes is one of the most important weeks of the season for them.
They now travel to Greece to play Olympiakos in the last 16 of the Champions League before facing Tottenham in the final of the Carling Cup at Wembley next Sunday.
Grant added: "We are in all the competitions. We won today and we are in the last eight of the FA Cup.
"The most important months have been December and January. We missed so many players but with just 14 or 15 players we stayed in all competitions.
"This is a big week because we did a fantastic job in those two months. It is a big week, I cannot say it is the biggest one, but it is important."
Grant was particularly pleased with the return of captain John Terry. The defender played his first game since December after recovering from a fractured foot two weeks ahead of schedule and looked back to his best.
"He's fantastic," said Grant. "I didn't plan for him to play 90 minutes, only 70. But he was looking so good I left him on the pitch. I am very happy to see him back."
Ritchie said: "The goal gave us a real lift at half-time and I thought we came out in the second half and looked very dangerous in the first 15 minutes.
"I think we annoyed them and they managed to take the game on. We knew it was going to be a massive task but the lads have not disgraced themselves.
"We had some good play in the second half, we kept the ball at times. They move the ball so quickly and we knew it would be hard for our lads to maintain the effort. But I thought we did.
"Lampard is top notch. He has drive and vision and he moves the ball so quickly.
"But Chelsea pass the ball at a pace. It moves your players around and that's what produces the holes in your defence. Frank was super today. He is always going to score goals.
"We were a little bit in awe of them and I think some of our tackles could have been a bit stronger physically."