The shooting happened in the borough’s Tremont section just after 10.30pm local time last night.
The plain clothes officers were nearing the end of their shift when they and three others responded to a report of a robbery at a small market. Police said they spotted two possible suspects and one opened fire.
A 30-year-old officer was shot in his left arm and lower back and a 38-year-old was hit in his left arm and chest.
The shooting comes about two weeks after two officers were shot dead as they sat in their patrol car in Brooklyn by a man who vowed online to kill “pigs”.
New York mayor Bill de Blasio said it was “disrespectful” for some city police officers to turn their backs to him during two funerals for dead police officers.
The acts of protest were hurtful to the families of the two cops killed in an ambush last month, Mr de Blasio said in his first public remarks on the officers’ protests.
The chasm between the police unions and the mayor has created the biggest crisis of his year-old tenure.
Police union leaders have said he contributed to an environment that allowed the officers’ deaths by supporting protests following the police killings of unarmed black men in New York City and Ferguson, Missouri.
Mr de Blasio argued that the public rebuke was an offence to the city at large.
“Those individuals who took certain actions the last two weeks, they were disrespectful to the families involved. That’s the bottom line,” he said at a news conference at police headquarters.
Patrick Lynch, head of the city’s rank-and-file police union, said after the deaths of Officers Rafael Ramos and Wenjian Liu that Mr de Blasio had “blood on his hands”. Thousands of officers turned their backs on the mayor.