Former prosecutor Jeanine Pirro has slammed the fired co-writer of her new book about accused killer Robert Durst by calling the unemployed journalist an ungrateful, pill-addicted alcoholic who’s only suing her as a publicity stunt.

The ex-collaborator, Lisa DePaulo, sued Pirro last month, claiming that the “Justice With Judge Jeanine” star has “little regard for the truth” and exaggerates her role in the Durst case for her tome, “He Killed Them All: Robert Durst and My Quest for Justice.”

Pirro, the former Westchester County district attorney, was a star in HBO’s docu-series “The Jinx: The Life and Deaths of Robert Durst,” in which Durst — the New York real estate scion who was suspected of three murders — seemingly admitted in the show’s finale, “What the hell did I do? Killed them all, of course.” Pirro’s office investigated the 1982 disappearance of Durst’s wife, Kathleen, for six years. Pirro published her memoir about the case on Tuesday.

In an affidavit filed in a Manhattan court Friday, Pirro said she generously invited DePaulo to “come live (with her dog) in the guest wing of my $5 million Rye, NY, home for the duration of the [book] project” last spring.

The journalist had “unfettered access” to the mansion, which she abused by “chain-smoking cigarettes in my home, drinking excessively and refusing to clean up after herself and her dog,” Pirro says. “She drank alcohol and popped pills to such an extent that she stumbled regularly, her hand shook and she fell asleep during work sessions.”

DePaulo’s lawyer, Richard Emery, fired back at Pirro’s claims: “Pirro does in her affidavit what she does in her book; attribute her own depraved and pathetic behavior to others whom she blames for her problems. It’s an unbridled egotist’s defense mechanism.”

Durst was arrested in New Orleans in March after the HBO show aired. Other critics of Pirro worry her new book could help his defense team.