Disgraced former Congressman Anthony Weiner was behaving like a jerk long before the world got a glimpse of his crotch.

A new book offering an inside look at the US House of Representatives depicts Weiner as a desperately ambitious loudmouth who berated his staff and would do or say anything for TV airtime.

Weiner “would enter his office in the Rayburn Building screaming at the top of his lungs, ‘Why the f–k am I not on MSNBC?!’” journalist Robert Draper wrote in “Do Not Ask What Good We Do: Inside the US House of Representatives.”

He finally got his wish, Draper wrote, when Weiner pushed to become the liberal spokesman for ObamaCare.

“He was now on MSNBC every week, sometimes every day — to the point where he was carrying his own makeup kit. (Or rather, his press guy was.)” Draper wrote.

PHOTOS: ANTHONY WEINER

Excerpts of the book, due out Tuesday, surfaced yesterday on the Web site Politico.

The arrogant Weiner takes a beating in several passages for his relentless self-promotion.

“When the health-care debate kicked in, Anthony Weiner became the one-man standard-bearer for the single-payer system,” the book says.

Then Weiner went rogue — saying and doing what he pleased without coordinating with then-House Speaker Nancy Pelosi, according to the book.

“Neither Pelosi nor anyone else deputized him to speak for his party. But as the ultimate freelancer, Anthony Weiner had discovered that if you go on TV often enough and say something catchy . . . your point of view . . . can actually become the conventional wisdom,” Draper wrote.

Weiner was so full of himself, he even lectured President Obama on how to sell health-care reform to the public while flying on Air Force One.

“In September 2009, after spending a day with Obama in New York to promote a financial-reform bill, Weiner hitched a ride back to Washington on the president’s private plane — and, being Weiner, couldn’t resist giving the leader of the free world some advice on how to achieve health reform,” according to the book.

“‘Mr. President, I think you’re looking at this entirely the wrong way,’ he said. ‘You need to simplify it. Just say that what we’re doing is gradually expanding Medicare,’ ” Draper wrote.

“At least Obama had a sense of humor,” the author added.

“‘Well,’ [Obama] said with a grin after their conversation, ‘Enjoy your last ride on Air Force One.’ ”

Weiner resigned last June after a three-week circus that began when it was revealed that he sent a lewd crotch photo via Twitter to a Washington state co-ed.