Shots were fired on Ely Avenue at around 5:30 a.m., police said.
The marshals were rushed to Jacobi Hospital for treatment of non-life-threatening injuries. They are in stable condition, officials said.
One marshal was shot in elbow and thigh. The other was shot in the leg, officials said.
A 9 mm Glock handgun was recovered at the scene, according to police.
Suspect Andre Sterling was shot and killed on-site, law enforcement officials told ABC News.
Sterling, who was wanted for shooting a state trooper in Massachusetts on Nov. 20, was facing multiple charges including armed assault with intent to murder and possession of a firearm, police said. He was also wanted in Wyoming on narcotics charges.
A second suspect involved in the shootout was taken to Jacobi Medical Center for treatment.
The shooting is being investigated by authorities in New York City.