The 30-year-old England international's old deal was set to expire in the summer of 2009 and he was the subject of a transfer bid from Inter's former Blues boss Jose Mourinho, which Chelsea rejected.
Lampard's new contract takes him through to the summer of 2014, when he will be 35. Chelsea originally offered Lampard a four-year deal, which he had refused to sign.
"Negotiations have been going on a long time with Chelsea," Lampard said. "With what happened in my personal life over the last few months [Lampard's mother died in April], I asked Chelsea for some time to get my head straight.
"I spent a lot of time with my family and worked out what I wanted to do. I'm 30, and I just wanted to make the right decision.
"I've had seven fantastic years here and now I can have five more, and hopefully finish my career here. Whether that will be in five years time or more, I don't know."
Lampard also commented on the speculation that linked him to a reunion with Mourinho, saying that he was tempted but that the club - and his family - helped him make the decision to stay.
"Everyone knows that Inter Milan made a bid for me, and of course that was an option," he admitted.
"I had to think about whether I wanted to be in London or away from London. Coming back to Chelsea and training with the boys made me realise the relationship I have with the club.
"My team-mates were very important in the decision, especially the captain John Terry.
"If we all work together I think the team can achieve success."
Much was made of Lampard's desire for a longer contract, and the wages he demanded, which he admitted were factors in talks.
"Everyone knows that the financial aspect of any negotiation is very important," he added.
"I'm very pleased I signed the five-year deal, because I think I can play for many years to come. Chelsea always stated they wanted to keep me, and that was a good thing for me."