Ronaldinho had a chance to open the scoring in his unofficial 100th appearance for the Selecao but was denied from the penalty spot by Joe Hart. Eight minutes later, Wayne Rooney showed the 32-year-old how to finish, stroking a loose ball into the back of the net after a good save by Julio Cesar.
Substitute Fred equalised swiftly after half-time before one of Roy Hodgson's own introductions, Frank Lampard, smashed the Three Lions back into the lead.
Ashley Cole became only England's seventh centurion, picked to start for the 100th time, while Manchester United centre-back Chris Smalling was an unexpected selection in defence.
Ronaldinho was handed a first start for Brazil after almost a year in the international wilderness, adding experience to a young, vibrant side headlined by the dazzling talent of Neymar.
Brazil started the match confidently, with Neymar threatening in behind, but it was England who came closest to opening the scoring, with Rooney's goalbound header producing a stunning reflex save from Julio Cesar.
In the 16th minute, veteran Ronaldinho's cross smashed into the arm of Jack Wilshere and the 32-year-old stepped up to take the penalty but was denied by the strong wrists of Hart.
The Three Lions goalkeeper palmed the ball away a second time as Ronaldinho looked to pounce on the rebound before Tom Cleverley completed the clearance with a risky goalmouth challenge on Neymar.
Wilshere made amends for his error shortly afterwards, playing a delicate through-ball for Arsenal team-mate Theo Walcott. The winger's shot was saved by Cesar but ricocheted to Rooney on the edge of the box, who calmly passed the ball between a mesh of yellow-and-green shirts to open the scoring.
|20/1||England are 20/1 with Coral to win World Cup 2014 in Brazil
Juts three minutes after the restart, England's hard-fought leaped was wiped out. Gary Cahill overran the ball deep in his own half, with Lucas Moura's half-block-half-tackle bouncing into the path of fellow sub Fred. The Fluminense forward took a touch and buried his left-footed shot in the top corner.
Seconds later, Hart's heavy pass bounced off Cahill and fell to the feet of Oscar. The Chelsea star cushioned the ball to Fred, whose curling effort from the edge of the box clipped the top of the crossbar.
But then it was England's chance to capitalise on an error. Arouca's wayward pass found only Rooney, whose lay-off to Lampard was expertly powered past Cesar from outside the area, cannoning off the inside off the near post before nestling in the opposite corner.
The flow of the match was stifled as both sides made a number of substitutions but England – limiting Brazil to just a handful of optimistic shots from range – hung on to claim a morale-boosting victory.