Loading...
In Philadelphia, Pedro Neto gave Chelsea an early lead but Flamengo, roared on by their frenzied supporters who made up the majority of the 54,019 crowd, did not deserve to be behind and came roaring back in the second half.
Bruno Henrique came off the bench in the 56th minute and quickly equalised before setting up former Real Madrid, Manchester City and Juventus defender Danilo to make it 2-1.
Chelsea were stunned, and their hopes of pulling level again were effectively destroyed when substitute Nicolas Jackson was sent off in the 68th minute for a dangerous tackle on Ayrton Lucas.
Wallace Yan then sealed the victory for the Rio de Janeiro club, the Brazilian league leaders, when he made it 3-1 late on.
"It was a special day for me and our club," said Flamengo coach Filipe Luis.
"We knew we would have chances against Chelsea, because we have one way to play and they know how to follow that path."
Flamengo have won both matches in Group D and their place in the knockout stage was confirmed later when Esperance of Tunisia defeated Los Angeles FC 1-0 in Nashville.
Youcef Belaili scored the only goal of the game in the 70th minute in front of a sparse crowd featuring Nicole Kidman.
LAFC, who were last-minute qualifiers after beating Club America of Mexico in a play-off, cannot now progress further.