Cook made 147 and Root, his successor as England captain, 125.
Alastair Cook marked his final Test innings with a storybook hundred and England captain Joe Root also made a century as India crumbled at the Oval on Monday.
England, already 3-1 up in this five-match series, were 364 for six in their second innings -- a lead of 404 runs -- at tea on the fourth day of the fifth Test.
Cook made 147 and Root, his successor as England captain, 125, with the pair putting on 259 for the third wicket.
The 33-year-old Cook is retiring from international cricket after this match and Monday's innings meant the Essex left-handed opener became just the fifth player and first Englishman to score a hundred in both their first and last Tests after Australia's Reggie Duff, Bill Ponsford and Greg Chappell and India's Mohammad Azharuddin.
England resumed on 114 for two, already 154 runs ahead, with Cook 43 not out and Root unbeaten on 29.
A capacity crowd, willing Cook to score a hundred, gave him the first of seven standing ovations on Monday as he walked out to bat on a sunny morning.
And they were soon giving him another when Cook, from his second ball of the bay, turned fast bowler Jasprit Bumrah off his pads to complete a 127-ball fifty with his fourth four.
Cook in fine touch, late cut left-arm spinner Ravindra Jadeja for another well-struck boundary.
Root followed up by sweeping Jadeja for two well-struck fours.
But he was reprived on 46 when an edged forcing shot off Jadeja was dropped by Ajinkya Rahane at slip.
Root then late cut paceman Mohammed Shami to go to fifty with his eighth four.
When Cook squirted a single off Shami he moved past Sri Lanka great Kumar Sangakkara's tally of 12,400 runs and into fifth place in the list of all-time leading Test run-scorers.
Meanwhile Root went down the pitch to drive Jadeja for six.
And when Shami dropped short on a good pitch, Root pulled him for a resounding four.
Cook, about to become a father for the third time, was already England's leading Test run scorer and century maker, with this match seeing him extend his national appearance record to 161 Tests.
And he completed his 33rd Test century in unusual fashion when, having run a single to go to 97, a wild overthrow from Bumrah gave him four bonus runs.
The crowd rose to give Cook, who made 71 in the first innings, yet another ovation as he celebrated a 210-ball century featuring eight fours and that five which took him to three figures.
It was his first Test hundred since he made a marathon 244 against Australia at Melbourne in December.
Root, 92 not out at lunch, was dropped on 94 when first slip Cheteshwar Pujara off Shami, although the fielder may have been distracted by wicket-keeper Rishabh Pant diving across him.
A quick single then saw Root to his first Test hundred in over a year since he made 136 against the West Indies at Edgbaston in August 2017.
Root leapt in the air in joy, a far more animated celebration than Cook's had been -- as his third century as England skipper came up in 151 balls including 11 fours and a six.
But with the pair in seemingly complete command they both fell in successive balls to part-time off-spinner Hanuma Vihari, the debutant claiming two distinguished scalps for his first two Test wickets to leave England 321 for four.
Root saw a slog-sweep held in the deep by substitute fielder Hardik Pandya.
With the batsmen having crossed, Cook faced the next ball.
Cook's edged cut was held by Pandya to end a near six-and-a-half hour innings of 286 balls including 14 fours.
Once more spectators were on their feet, Cook bowing out with a record of 12,472 Test runs, including 33 hundreds, at an average of 45.35.
India were becoming increasingly shabby in the field, with Pant conceding five penalty runs when the ball hit the unused helmet behind him after he failed to gather cleanly.