NYPD Transit Chief Edward Delatorre said the officers erected a wall using plywood last Tuesday to create a wooden enclosure that resembled a typical subway construction area.
He said officers hid behind the wall and waited until the suspect, identified as 43-year-old Jamie Montemarano, showed up. When he did, they jumped out from behind him and made the arrest.
Delatorre said the officers came up with the idea after months of complaints from riders. Subway workers removed the graffiti after each complaint, but it returned like clockwork, he said.
"On January 9, they received the first complaint about graffiti on a beam in the mezzanine at the Court Street station," Delatorre said. "They got numerous complaints from riders as well as transit workers about the graffiti."
Delatorre explained the sting operation during a City Council hearing on Tuesday while answering questions about how neighborhood coordination officers, or NCOs, help protect the subways.
"The officers who know the station well asked if they could put up a temporary wall which would create an enclosure, a small room, so the officers could do an operation at that end of the station, where this beam was," he said. "The officers went in for the first time on March 15. The beam was cleaned off. March 15 they went in, did a plainclothes operation, and sure enough, our man came back."
Montemarano, the suspect, was charged with criminal mischief and making graffiti. It's unclear if he's obtained an attorney.
ABC News' Mark Crudele contributed to this report.