It happened on Wednesday just after midnight in front of a home on Hoyt Street in Boerum Hill.
The two men approached a 46-year-old man, took out their guns, and then fired them several times at the victim.
The man suffered a gunshot wound to his left leg.
He was rushed to New York-Presbyterian Brooklyn Methodist Hospital in stable condition.
The gunmen fled southbound on Hoyt Street towards Douglass Street.
Anyone with information in regard to this incident is asked to call the NYPD's Crime Stoppers Hotline at 1-800-577-TIPS (8477) or for Spanish, 1-888-57-PISTA (74782).
MORE NEWS | Cuomo ending NY food service curfews, senate repeals some COVID executive orders
* More Brooklyn news
* Send us a news tip
* Download the abc7NY app for breaking news alerts
* Follow us on YouTube