Officials whistled Barnes for the penalty following a 27-yard run by Louis Murphy in the first quarter Sunday. The 8-yard penalty gave Oakland the ball at San Diego's 7-yard line, leading to a Raiders touchdown.
Barnes was leading the Chargers with 11 sacks this season.
He took off his helmet and was yelling back at officials on the field following his ejection. It was not immediately clear exactly why Barnes was ejected.
Shaun Phillips saw more time at outside linebacker in his place.
The Chargers won 38-26.
Information from The Associated Press contributed to this report.