Jonathan Thompson, 19, turned himself in to police Sunday night and was charged with making a terroristic threat and aggravated harassment, the New York Daily News reported.
Sources told the newspaper Thompson, 19, called for a hit on Deputy Inspector Joseph Gulotta following a Daily News report about Gulotta's precinct using social media to trace guns and track down gang members.
The sources said Thompson's post on the precinct's Facebook page described Gulotta's vehicle and his work schedule.
"A threat against a police officer is a threat against all of us," city District Attorney Charles Hynes said.
Defense attorney Phillip Lights said his client, who has 13 prior arrests, "never made any threats against the police department."
The New York Post reported a source said Thompson is a reputed member of the Hood Stars gang, which has had an ongoing feud with the Wave Gang.
The newspaper said the suspect was driven to the police station by the Rev. Vernon Williams.
"I don't know him or the family," Williams said. "But I received two anonymous phone calls requesting my assistance, and I'm honored that they thought to call me.
"I picked him up from an undisclosed location and took him and met with his lawyer and his mother" at the police station.