An impressive Eden Hazard teed up the veteran midfielder’s 19th-minute header with a skilful chip into the box before adding one of his own early in the second half.
Lampard, on his 595th Blues appearance, was unmarked when he met Hazard’s clipped cross from the right channel with a firm header for his first goal since his strike in the FA Cup fourth-round replay with Brentford.
Chelsea would have been in front earlier had Demba Ba converted instead of slicing wide when played in by Lampard in the seventh minute.
In the first half West Ham rarely threatened – Andy Carroll had a strike chalked off for a push in the back on David Luiz – and the Blues should have been out of sight by the interval.
Jussi Jaaskelainen saved a low Luiz free-kick and twice denied Ba when the striker had been found by Victor Moses, who also shot wide on the turn from Cesar Azpilicueta’s cross as West Ham again left a Chelsea player in space in the box.
Juan Mata curled off target, a spectacular Luiz left-footed volley went narrowly wide and Chelsea’s dominance continued after the break.
Hazard collected an attacking throw-in down the right, linked with Mata and then was allowed to drift across the area. The Belgian then went past a hapless Winston Reid and James Collins before shooting left-footed and low into the bottom corner.
Jack Collison, Gary O’Neil and Carroll, twice, tried but failed to trouble Petr Cech before Reid was booked for cynically pulling back Mata as the Spaniard forged forward.
Hazard had a shot blocked by Joey O’Brien and Ba shot wide under pressure from Reid, while Terry came on for a 12-minute cameo appearance, replacing Luiz, who hobbled off and straight down the tunnel in the 78th minute.
Hammers substitute Carlton Cole got in front of Cahill at the near post but Cech saved and Carroll headed over from a late corner for the Hammers, who were then fortunate not to concede a third goal.
Uncharacteristically Lampard ballooned a shot over from Oscar’s cross after 86 minutes before soaking up the acclaim at the final whistle.