A Brooklyn man is suing a prosecutor for $2 million for trying to send him to prison after his buddy died in a playground fight.

Malik White admits he slugged pal Corey Ray in the heat of the moment during a 2007 basketball game at Elton Park in East New York.

But although Ray’s own mother blamed doctors for his death, and sued Brookdale Hospital for malpractice, a determined prosecutor tried to pin the tragedy on White, and made up evidence to support his case, the suit claims.

Prosecutor Kyle Reeves said at White’s trial that White stomped and kicked Ray repeatedly, causing a “fracture in the middle of his skull.”

But Reeves never proved that contention, and the medical examiner’s autopsy did not back it up, the suit says. White was ultimately acquitted.

“I felt railroaded,” White said. “I have no faith in the justice system. The prosecutor knew he didn’t have a case and he still tried to throw me in prison.”

The lawsuit, which names the city and two responding police officers as defendants, also accuses Reeves of asking Ray’s mother’s civil attorney to postpone her suit against the hospital until after White’s trial.

“The Brooklyn community is well aware that the Kings County District Attorney’s Office under former DA Charles Hynes engaged in pervasive patterns of prosecutorial misconduct,” said White’s civil lawyer, Tracey Grant.