Comedian Chris Rock let fly while introducing the Red Hot Chili Peppers
The BBC has been censured by media watchdog Ofcom after swearing was aired before the watershed during last year's Live Earth concert in London.
Ofcom acted after 22 viewers complained about what the regulator called "the most offensive language".
Chris Rock and Phil Collins were among the stars who let fly with expletives.
The corporation will have to broadcast a summary of Ofcom's findings on both BBC One and BBC Two. The BBC said it had "taken note" of Ofcom's findings.
The regulator said there were six instances of bad language from performers during Live Earth at Wembley Stadium, which was aired on both channels.
The series of concerts, held in July 2007, was held to increase awareness of climate change. It was broadcast live and without a time delay.
"The most offensive language had been broadcast on BBC One and BBC Two repeatedly before the watershed and this material was not justified by the context of broadcasts that were likely to appeal to children," Ofcom said.
"The likely audience would have expected to have been protected from the most offensive language in such a programme on BBC TV's flagship services."
It follows criticism from the regulator after swearing was broadcast before the 2100 watershed during the Live 8 anti-poverty concert in 2005.
"The BBC had not sufficiently taken into account Ofcom's previous decisions in cases similar to Live Earth," Ofcom said in its findings.
It is not known when BBC One and BBC Two will have to broadcast Ofcom's findings, but it is one of the most serious sanctions applied against the BBC by Ofcom.
Last year the corporation was fined £50,000 after the results of a Blue Peter competition were faked.