Shots were fired on Ely Avenue around 5:30 a. m. m, police said.
The marshals were taken to Jacobi Hospital to repair life-threatening injuries and are in solid condition, authorities said.
One marshal was shot in the elbow and thigh and the other in the leg, authorities said.
A 9mm Glock gun discovered at the site, police said.
Suspect Andre Sterling was shot dead at the scene, police authorities told ABC News.
Sterling, who was wanted for shooting a state soldier in Massachusetts on November 20, faces charges, adding attack with intent to murder and possession of a firearm, police said. He was also wanted in Wyoming for narcotics.
A momentary suspect worried about the shooting taken to Jacobi Medical Center for treatment.
The shooting is being investigated by New York authorities.
Policy 24/7 of the latest news and events.