South Africa, at tea on the third day, were 480 for seven in reply to England's first innings 203 - a lead of 277.
De Villiers was 158 not out and Paul Harris 11 not out after vice-captain Ashwell Prince had made a Test-best 149, his second hundred in as many matches.
South Africa wicket-keeper Mark Boucher, dropped twice on eight, helped de Villiers add 67 for the sixth wicket.
But he rarely looked comfortable and was out for 34 when, attempting a rare aggressive shot, he played on after trying to pull James Anderson.
Soon, 422 for six became 427 for seven when Monty Panesar took his first wicket for 82 overs when be bowled Morne Morkel through a big gap between bat and pad for nought.
Anderson's first delivery with the new ball, a long hop, was confidently put away by de Villiers for his 150.
Before lunch, England had finally seen the back of Prince with controversial debutant Darren Pattinson, born in Grimsby but raised in Australia, who took the only wicket to fall on Saturday, removing the stubborn left-hander.
In his second over of the day, the 29-year-old seamer - appearing in just his 12th first-class match - was bowling from around the wicket when Prince edged a full length delivery to wicket-keeper Tim Ambrose.
Prince, who'd made 101 in the drawn first Test at Lord's, had batted for nearly seven hours, facing 284 balls with two sixes and 17 fours.
His stand of 212 in 75 overs with de Villiers, notable for the pair's excellent running between the wickets, was a new South Africa record for the fifth-wicket against England, surpassing the 192 shared by Gary Kirsten and Boucher at Durban in 1999.
De Villiers made Pattinson pay for dropping short on a placid pitch when he cut him through the offside for four in front of square to go to 99.
A fired-up Andrew Flintoff - who at tea had bowled 40 overs - twice beat de Villiers outside off-stump.
De Villiers, who'd angered England on Friday by claiming to have caught Andrew Strauss when the ball had in fact bounced, spent 13 balls on 99, his single off Flintoff saw de Villiers complete his sixth Test hundred off 264 balls with 11 fours.
South Africa resumed Sunday on 322 for four. Prince was 134 not out and de Villiers 70 not out.
Anderson and fellow Lancashire quick Flintoff, playing his first Test in 18 months after being out with ankle and side injuries, soon settled into a probing line and length.
However, when first change Stuart Broad dropped short, with his fifth ball, de Villiers cut him for four.
Prince then confidently drove Broad on the up, for four through extra-cover, to go past his previous highest Test score of 139 not out against Zimbabwe at Centurion in 2005.
England 1st Innings 203 (M Morkel 4-52, D Steyn 4-76)