The retired NYPD commander exposed by The Post as a former drug dealer and pal of a notorious cop-killer isn’t ashamed of his twisted past.

Actually, he’s loving the publicity.

“Do you know how much I’d have to pay to get on the cover [of The Post]? $1 million!” disgraced former police Deputy Inspector Corey Pegues bragged while buying three copies of Monday’s paper at a gas station near his Hempstead, LI, home.

Pegues, 45, proudly pointed out his front-page photo to a customer inside the store before jubilantly slapping hands with the counter clerk. “That is me!” he boasted.

But the retired cop clammed up when a Post reporter approached him in the parking lot as he talked on his phone while sitting in a spanking-new Mercedes-Benz E350.

“I think it’s irresponsible reporting, but you know I can’t comment,” he said.

“My lawyer and my publicist wouldn’t want that,” Pegues added. “You gotta stay away from my house, you gotta stay away from my family. Otherwise, you’re going to see this side of me come out,” he said, tapping The Post’s front page about him being a former drug thug.

Pegues then returned to his nearby home, a stucco-covered Cape Cod cottage outfitted with at least three surveillance cameras and multiple motion detectors. Later, he sent out his 27-year-old son, also named Corey, to buy additional copies of the paper.

In Monday’s exclusive report, The Post revealed how Pegues shared on a podcast last month that he was a crack-dealing gangbanger in Queens before he joined the NYPD. He admitted he had once tried to murder a rival dealer only to have his pistol misfire — and also said he was a close friend of David McClary, who infamously murdered NYPD rookie cop Eddie Byrne as the officer watched over a witness’ home in 1988.

Pegues, whose admitted crimes are all past their statutes of limitation, discussed his sordid past on the online “The Combat Jack Show” to tout his unpublished memoir, “From the Streets to the Beat.”

He retired last year on a tax-free, $135,000-a-year disability pension, which law enforcement sources said he scored after falling off a chair while serving as commanding officer of the 67th Precinct in Brooklyn.

Ex-NYPD Commissioner Ray Kelly, who promoted Pegues to deputy inspector and has been photographed with him, wouldn’t discuss Pegues with The Post on Monday.

But Pat Lynch, president of the Patrolmen’s Benevolent Association, demanded an “extensive and thorough investigation” of Pegues.

“He’s a stain on the reputation of a heroic department,” Lynch said.

Authorities could seek to revoke Pegues’ pension if he somehow lied on his NYPD employment application, law enforcement sources said.

Current NYPD Commissioner Bill Bratton said, “I’ll get a briefing sometime later today or tomorrow to see … if there is anything we need to do looking back on his time with us.’’

Additional reporting by Larry Celona, Kirstan Conley and Amber Jamieson