Leading in the absence of Faf du Plessis, serving a one-match suspension for the team's second slow-over-rate offence in a year, De Villiers hit 69 not out off 28 deliveries to fire his team to 196 for five, the highest score of this year's tournament.
He returned to marshal his bowlers to restrict England to 193 for seven and get a win that snuffed out the 2010 champions' last-four hopes at the Zahur Ahmed Chowdhury Stadium.
"It was important for the team to go through to the semis and get him [Du Plessis] back and pumped up for the next game," said man-of-the-match De Villiers.
For England, Alex Hales (38) benefited from a dubious no-ball decision and alongside Michael Lumb (18) added 46 runs in 4.4 overs before Wayne Parnell came up with a three-wicket burst to derail England's chase.
Leg-spinner Imran Tahir claimed the important wickets of Eoin Morgan (14) and Jos Buttler (34) who fought valiantly before his dismissal virtually sealed the result.
"Obviously we're heartbroken to come out on the wrong side of it but you have to give full credit to the way AB batted right through the end," England captain Stuart Broad said.
Broad was proud of his side's efforts with the bat where they impressed for the third successive match.
He added: "AB de Villiers was fantastic tonight, he was the difference between the two sides, but the character we showed to come and get 190 again and put the South African bowlers under that sort of pressure is credit to the guys.
"I think every bowler would agree with me that these are nightmare conditions to bowl in, wet ball, wet outfield, greasy wicket, so we knew that it was gettable.
"But we just didn't have that one guy who went and did a Hales the other night."
Regarding England's overall showing in Bangladesh, Broad felt there were plenty of positives.
He said: "A lot of people would have been very surprised if we'd have got out of a group with such strong sides in it and you're going to have big teams not making it to the semi-finals.
"But we have done good things in this World Cup which will stand us in good stead."
The winner of tomorrow's Sri Lanka v New Zealand match will join South Africa, India and another team from Group Two, in the last four.
Earlier, Hashim Amla (56) dominated a 90-run opening partnership with Quinton de Kock (29) proving once again it is possible to score briskly without looking ugly.
Not even two power failures, each halting play for about 10 minutes, could affect Amla's concentration as the elegant batsman flicked and drove.
The right-hander raced to a 30-ball half-century after Buttler missed an easy stumping chance on 19. Broad eventually dismissed Amla in his second over
De Villiers played like only he can, unfurling his range of cheeky shots to defy the English field setting in his unbeaten 28-ball blitz that contained three sixes and nine fours.
Other result: Holland 151-4 innings complete v New Zealand 152-4 (B B McCullum 65). New Zealand (2pts) beat Holland (0pts) by 6 wkts.