Juan Mata fired a clinical opening goal after 54 minutes and Oscar, who hit the outside of a post in the first half, tucked in his second goal in four days after 68 minutes.
Mata was the provider for Lampard's 199th Chelsea goal before Terry, making just his third start under the interim boss Rafael Benitez, headed in an 81st-minute fourth as last season's Champions League winners stayed on course for a fifth FA Cup triumph in seven seasons.
The visitors had the first effort on goal as Adam Forshaw shot wide across Petr Cech before Bees captain Jonathan Douglas tried to spark an attack and was caught on the ankle by a late and high tackle by Gary Cahill.
Victor Moses was lively for Chelsea, pulling a ball back for Lampard, who mis-kicked in a crowded area. Oscar struck the post after 26 minutes, before a Brentford counter-attack ended when Forshaw shot narrowly wide from the edge of the area.
Marcello Trotta had the ball in Chelsea's net after 39 minutes, but referee Neil Swarbrick had already blown for a Luiz foul on Forshaw, whose subsequent free-kick hit the wall. Chelsea should have gone in front when Branislav Ivanovic found an unmarked Lampard in the box, but again the midfielder's usually-clinical finish deserted him.
Demba Ba was unable to convert after Simon Moore saved Ivanovic's header from Oscar's cross as Chelsea resumed at pace and on the attack. It was the direct route which produced a result as Ba challenged Harlee Dean to meet Cech's long clearance and the ball fell for Mata, who drilled into the bottom corner from 20 yards.
Harry Forrester replaced Trotta immediately following the goal but supply was in short demand for Brentford as Chelsea continued to dominate possession, before going 2-0 up after 68 minutes. Oscar met an Ivanovic cross from the right with a back flick which deflected off a defender to go by Moore.
Three minutes later it was 3-0, with Mata dashing down the left and cutting back for Lampard to sidefoot his volley in. Chelsea sensed the opportunity for more goals and took it when Oscar's inswinging cross to the far post found Terry, who headed in from a narrow angle with Moore floundering.
Luiz needlessly body-checked substitute Jake Reeves as Brentford finished beaten and bruised, with Chelsea advancing to the next round.
Source: PA
Source: PA