Anthony James Lescowitch Jr had been evading arrest in Pennsylvania since November last year.
The Freeland Police Department posted a photo of Lescowitch on its Facebook page last Monday, noting that Lescowitch, 35, was wanted for aggravated assault and numerous other charges.
The post asked that anyone knowing Lescowitch's whereabouts to call police or 911.
Police said they noticed Lescowitch shared their post about him on his Facebook page minutes after they posted it on theirs, and he mocked police in his post as well, Timesleader.Com reported.
Lescowitch agreed to meet up with the undercover officer for a cigarette.
When the suspect arrived at the specified location, he was met by the police and arrested.