Four Brooklyn cops from the same police precinct are under investigation amid allegations they planted guns on innocent men, claiming to have “informants” to corroborate the charges but then never producing them in court.

The police probe came to light as charges were dropped Thursday against one of the allegedly framed suspects.

The Brooklyn DA’s office said it will look into at least half a dozen cases going back to 2007 at the 67th Precinct, where cops are accused of planting and fabricating evidence.

One of the men allegedly railroaded by the group of officers — Jeffery Herring, 53 — was cleared Thursday of weapons possession charges when a confidential police informant was never produced, despite a judge’s order that the witness appear in court.

“Anyone arrested with a gun by this team, those cases need to be investigated, just like they’ve done with other officers whose behavior is questionable,” said Herring’s lawyer Debbie Silberman.

During Herring’s hearing in Brooklyn Supreme Court, prosecutors asked to drop the case, saying they couldn’t prove the charges against him.

“Then, the case is dismissed and sealed,” said Brooklyn Supreme Court Justice Dineen Riviezzo, who last month ordered prosecutors to produce the informant.

Herring said he was relieved to avoid 15 years in prison.

“I was fighting for my life,” he said after court. “I don’t want to be in prison. I love my freedom. I have a beautiful dog to take care of.”

The Brooklyn DA Ken Thompson said he would look into how cops handled the case.

“We will investigate the arrest of Mr. Herring and other arrests by these officers because of the serious questions raised by this case,” DA Ken Thompson said in a statement.

“This is an active investigation by the NYPD’s Internal Affairs Bureau,” Deputy Chief Kim Royster, a NYPD spokeswoman, added.

Several other men arrested by the same 67th Precinct team – including NYPD Det. Gregory Jean-Baptiste – have also been cleared.

Eugene Moore had his 2012 weapons case dismissed when a judge called Jean-Baptiste’s testimony “extremely evasive” and said, “The officer could scarcely recall his own name much less anything that happened with regard to an arrest,” according to court papers. In another case, Jean-Baptiste’s testimony was called “incredible” by a judge.

The detective retired in 2013 after a drunken driving conviction and a civil lawsuit that accused him of stealing $200 from a suspect, a police source and court papers said.

Silberman said in court last month that she had also located two other gun arrests with the same allegations of misconduct against the 67th Precinct team – bringing the total number of allegedly shady cases to six.

Police sources said the reason the informants couldn’t be produced in court wasn’t because of any shadiness but because informants are reluctant to testify “because they could be killed.”

Additional reporting by Jamie Schram