Police say it was part of an internal affairs investigation.
During the operation 37-year-old Luis Gutierrez allegedly offered money in exchange for sex and was then arrested.
It happened Thursday. Gutierrez works as a police officer in Astoria, Queens.
He faces charges of patronizing a prostitute, official misconduct, and conspiracy.