Lampard hit City's first as they wrapped up their Barclays Premier League campaign with a sixth successive victory, beating Southampton 2-0 at the Etihad Stadium.
Top scorer Sergio Aguero was also on target, underlining the predatory instincts that have earned him the Premier League's golden boot with his 26th goal of the campaign.
Lampard's strike was his 259th on his 882nd appearance in English club football and he now heads off to join New York City after receiving a standing ovation from all sides of the ground.
Pellegrini said: "It was very important to finish the season in front of our fans by winning the game and it was also important for Frank
It makes a difference if you win.
"I think he deserves the farewell all our fans gave him in the stadium
It was very important also for him to score.
"I think it was the perfect afternoon and perfect goodbye for him
He deserves it for his brilliant career and being a great person."
Lampard paid tribute to the club when he addressed supporters prior to the players' lap of appreciation.
He said: "I have turned up here at age of 36
I didn't know what to expect, from the dressing room and the fans and living in this city, and all I can say is thank you so much to everybody.
"This is a very special club and from bottom of my heart it's been a pleasure to play for you."
City actually fielded a trio of midfield players who may not be at the club next season as James Milner and Yaya Toure also started.
England international Milner is out of contract this summer while Toure, City's driving force for much of the past five years, has been consistently linked with a move.
Both received warm applause when they were substituted in the second half but Pellegrini insisted nothing was definite.
The Chilean said: "I think the only player that said goodbye was Frank Lampard.
"Yaya returned in the last game after an injury of 15 days - he finished very tired and he couldn't finish the last game either
I didn't want him to have some muscle injuries and that is why I changed him.
"Milner had an important kick in his knee, that is why he couldn't finish the game.
"We will see, not only for those two names, who will stay here or not
That was not the reason why they were changed."
Milner has been offered a new deal and fans called for him to stay during the game, but the 29-year-old still has a decision to make.
Pellegrini said: "James said he was taking the decision at the end of the season
He is a very important player and he gave us a lot of spirit in this year but he must decide what is better for him."
As for Aguero, who finished the campaign with 32 goals in all competitions, Pellegrini claimed such high standards had become the norm.
He said: "It is difficult not to be impressed with Sergio because I work with him every day and know what a player he is
He is improving a lot.
"It is very important for him to win the Golden Boot for the first time in his career and I am sure we are going to see, in the next years, 'Kun' as an even better player."
Pellegrini's own future - which was the subject of heavy speculation in March and April - will now be determined after a standard end-of-season review with chairman Khaldoon Al Mubarak.
But there has been no indication from City that a change could be made and Pellegrini said: "I am always talking with Khaldoon.
"I don't need a special meeting but when you finish the season you must analyse what you did, see what were our mistakes and where we must improve."
The defeat for Southampton meant they finished seventh in the table and they must now wait for the outcome of next week's FA Cup final before knowing if they will play in the Europa League next season.
Manager Ronald Koeman said: "If we get that chance to play in Europe, I would like that
It means a lot for the club and a lot for the players.
"It was an amazing season
We did a great job
The players showed their qualities and the spirit was amazing.
"We had a difficult pre-season but we showed our qualities and have always tried to play attractive, offensive football
If you finish seventh, that is our title, behind the big six."
Source : PA
Source: PA