Adam Brody has become such an arrogant jerk on the set of “The O.C.” that producers have told him to get his act together — or else, say sources.

Set insiders say execs have even discussed killing off his character Seth Cohen at the end of the season to get rid of 24-year-old Adam . . . and his attitude.

“As Adam’s popularity on the show has grown, his drama queen-like temper tantrums have grown in frequency and intensity,” one insider revealed.

“He plays a lovable dork on the series and is a crucial member of the cast, but it’s gotten to the point where he feels he IS the show.

“He ignores set personnel and criticizes everything from how his character is depicted in the writing to his wardrobe.

“Adam will abruptly stop a scene and snap at another actor if he thinks they’re stepping on his lines, unless it’s someone prominent on the show like veteran Peter Gallagher.

“And there was one time that Adam cynically joked to Peter when he felt his older co-star was coming in too soon with his dialogue, saying, “Give us YOUNG guys a chance, Peter. You’re stepping on my toes.”

“Everyone was stunned — including Peter. But before anyone could say anything Adam stomped off the set like a little kid.

“On the flip side, if Adam steps on another actor’s lines, he says ??On-set rants land him in hot water he was just ‘in the moment’ or ‘adding to the scene’ and scolds his counterpart for taking themselves too seriously.

“And it’s obvious that Adam is very jealous of Benjamin McKenzie, who plays the other male lead on the series, Ryan Atwood.

“Adam says he’s the biggest draw on the show so he doesn’t understand why McKenzie gets the better story lines.

“To show his displeasure, Adam gives Ben the cold shoulder.”

He also wants his character to have a more dramatic edge and not always be comic relief, another source disclosed.

“Adam once suggested a story line where he becomes addicted to drugs, explaining to the higher-ups that they weren’t allowing him to display his true acting talents.

“It caused some of the producers to joke that maybe they should just kill off his character and end Adam’s ego-inflated flights of fancy and on-set rants — but some of the producers weren’t really joking!”

The insider added: “Producers patiently explained to Adam he should be grateful he has the opportunity of being on a hit show like ‘The O.C.,’ that something like this doesn’t come along every day and if he doesn’t get his act together he’ll be sorry.

“They stressed that it is an ensemble show — and no one is irreplaceable!”