The 2013 conviction of a former New York City police officer in a plot to kidnap, torture, kill and eat women was overturned late Monday by a federal judge who said there was not sufficient evidence to support it.

The judge, Paul G. Gardephe of Federal District Court in Manhattan, granted the former officer, Gilberto Valle, a verdict of acquittal on the most serious count that he faced, kidnapping conspiracy. He could have faced life in prison on that count.

“The evidentiary record is such that it is more likely than not the case that all of Valle’s Internet communications about kidnapping are fantasy role-play,” Judge Gardephe said in a 118-page opinion issued late Monday night.

Mr. Valle, who was convicted in March 2013, had not yet been sentenced, and his federal public defenders had asked Judge Gardephe to grant him a new trial, arguing that the Constitution granted people — including police officers — “the right to fantasize about whatever and whomever they like, free from government interference.”