A Brooklyn cop moonlighted as a pimp with a stable of 11 hookers — sometimes heading straight from work at his NYPD precinct to his seedy side gig, authorities said Tuesday.

Eduardo Cornejo, an ex-Marine whose wife is a cop, used his personal car to ferry the prostitutes to hot-sheets motels around the area — charging johns $100 for 15 minutes and $150 for 30 minutes, officials said.

The 11-year veteran was well aware of the risks he was taking, according to a wiretap made while Cornejo was talking with several women in a car Jan. 21.

“That might make it hot though, standing outside with a bunch of girls. … [The cops] are going to know what’s up real quick,” he allegedly warned them.

Cornejo, 33, had been fired from the department last month after smoking pot and failing a drug test — and busted for prostitution Tuesday at the Nissan dealership where he had just taken a job.

The NYPD’s Internal Affairs Bureau and the FBI were first alerted to his alleged shenanigans after getting a tip in the spring that he was pimping out a woman.

In July, undercover officers saw Cornejo​ bringing young women to motels from Long Island to New Jersey and actively negotiating with customers, Brooklyn federal-court documents state.

Sources said Cornejo worked at the 67th Precinct before being transferred to the 79th Precinct around 2012. He was transferred because he had gotten into a dustup with a security guard during a Mets game at Citi Field over changing seats.

In October 2015, cops stopped Cornejo in his personal car for erratic driving after seeing him pimping several women at an East Meadow, ​LI, motel, officials said.

“During the car stop, members of law enforcement observed female attire including thong underwear inside the Cornejo vehicle,” papers state.

A judge authorized agents to install ​a ​bug in Cornejo’s car last month, and he was caught on tape explicitly discussing prostitution activity, according to the complaint.

He was arraigned and held without bail Tuesday. His estranged wife was in court but declined comment.

His brother told The Post that Cornejo was being framed.

“ He’s always been a good guy, he’s former military. I don’t know where all of this stuff came from,’’ said the sibling, who declined to be named.

Additional reporting by Jamie Schram, Larry Celona and Gabrielle Fonrouge