Anthony Weiner is trying to transform himself into the next Longfellow.

The serial sexter and former congressman — who is now living in a Bronx halfway house after doing hard time for sexting a teenager — is skulking around Manhattan’s publishing houses trying to shop a book proposal, literary sources say.

So far, interest has been flaccid.

“Every Simon & Schuster imprint has passed,” an insider told The Post.

The project is being repped by the hot downtown boutique agency Foundry Literary + Media — which was behind nonfiction best-sellers by “Daily Show” host Trevor Noah, New Orleans Saints coach Sean Payton and “Jersey Shore” star Vinny Guadagnino.

It was unclear what sordid chapters Weiner’s book would address — or if he would write under his nom de perv, Carlos Danger.

But there is certainly enough material in his Shakespearean fall from mayoral candidate to registered Level 1 sex offender.

Not to mention plot twists like his now-defunct marriage to Hillary Clinton aide Huma Abedin and his cameo in the 2016 presidential election as the man who may have sunk the former secretary of state’s chances when the FBI found hundreds of thousands of her emails on a laptop belonging to him.

Weiner, 54, certainly had enough time to write a manuscript as he served 21 months for sending lewd messages to a 15-year-old before being released in February.

The once-rising star Democrat flamed out with a series of sexting scandals that began in 2011, when he resigned from Congress after being caught sending X-rated pics to women over social media.

The public seemed to have given him a second chance when he became a front-runner in the 2013 mayor’s race — until yet another sexting scandal took him down.

He was finally busted in 2017 for sexting with a North Carolina high school student.

A weepy Weiner admitted at his sentencing that he was a “very sick man.”

Abedin, 42, filed for divorce hours after his guilty pleas but later withdrew the case to settle matters out of court.

Weiner and Foundry did not return calls for comment.

Suggested titles for Anthony Weiner’s upcoming book: