The shooting happened at around 7 a.m. Saturday at an apartment building in the borough's Soundview section.
Police say the wounded man was hospitalized in stable condition and expected to survive.
The suspect was in custody and a quantity of heroin was found in the apartment.
A law enforcement official says it appears that officer Andrew McCormack fired accidentally as the raid unfolded.
McCormack is the son of a police officer who was killed in the line of duty in 1983.
The official spoke to The Associated Press on condition of anonymity because of the sensitivity of the ongoing investigation.