The 73-year-old is nearing the end of his fourth season with Palace and has kept them clear of the relegation places in each of those campaigns.
Hodgson will step away from Premier League management after his last two matches against Arsenal and Liverpool.
With Hodgson's contract due to expire, former Chelsea boss Lampard has long been linked with taking over as his replacement having been sacked by the Blues in January.
"After more than 45 years of coaching I have decided that the time is right for me to step away from the rigours of top-flight Premier League football, so our final two matches will be my last ones as manager of Crystal Palace," Hodgson confirmed in a statement to the Palace website.
"It's been a particularly rewarding period of my football life and career to have been able to spend these last four seasons with Palace.
"I feel now that at the end of another successful season, in which we have secured our Premier League status, the moment is right for me to step down from my responsibilities of being a full-time manager.
"I have had so much support from my wife and family throughout my career and I have been contemplating this decision for some time, and now I believe the time is right to consider them and to see what the future holds for me.
"I have really enjoyed my time at Palace, I have been privileged to work with an outstanding group of professional and dedicated players, most of whom have been with me throughout the four years."
Palace have finished 11th, 12th and 14th under Hodgson. This season they sit 13th after a dramatic 3-2 win over Aston Villa last time out.
Chairman Steve Parish said: "It has been an absolute privilege and pleasure to work alongside Roy, who is both a magnificent human and an outstanding football manager.
"I know how much it has meant to Roy managing the club he supported as a child, adding to his distinguished and unparalleled career in football management.
"His record with us simply cannot be overstated, he is the only Palace manager to secure four years in the Premier League and he has helped give us stability in the most turbulent of times."
Assistant manager Ray Lewington will also leave with Hodgson.
Palace have a host of players out of contract at the end of the season too, so there will be significant changes throughout the club in 2021-22.
They face Arsenal on Wednesday and Gunners boss Mikel Arteta paid tribute to the veteran Hodgson.
Arteta said: "He's an absolute legend. What he's done in football, for English football, what he transmits as a person and the work he has done at different clubs is remarkable.
"To keep doing it for so long with the way he has always conducted himself, it's a great example as a young coach of someone I admire.
"We can count them [managers like Hodgson] with one hand. What he has done, in this league in particular, is incredible."