“You know, oddly enough, I was never really into cannibalism,” Gilberto Valle tells me at an all-night diner in Elmhurst, Queens. For the last three years, the baby-faced former New York City police officer has appeared on tabloid covers as the “Cannibal Cop”—a deranged, scary, or perhaps just ridiculous criminal who supposedly masterminded plots to kidnap, cook, and eat several different women, including the one who was then his wife. Now he says that he has no taste for human flesh. It’s not his thing.

Sure, Valle wrote about cooking women in his lurid chats on fetish websites—the ones that got him sent to prison, fired from his job, and separated from his infant daughter Josephine. This was more like playing to an audience, he explains over an order of eggs and whole wheat toast. “You start getting positive feedback, and you want to keep providing for people. It’s like this courtesy. If the other guy is into recipes for organ meat, well … I’m not into that shit at all, but that’s the way it works. If he wants to take it that way, you engage him that way.”

In late October 2012, Valle opened up the front door to his apartment and found half a dozen guns pointed at his chest. He was under arrest for conspiring to kidnap women with fellow users of DarkFetishNet, a Facebook clone for snuff enthusiasts. In the trial that ensued, prosecutors argued that Valle really meant to do at least some of what he’d prattled on about in late-night binges at the keyboard. They said he really planned to grab women from their homes—sometimes several different women from several different cities on the same day—and whisk them off to nonexistent mountain hideaways where he’d roast them on imaginary spits over roaring, notional bonfires.

As of the morning of Dec. 3, though, Valle has been exonerated. A federal appeals court upheld an earlier decision to overturn the verdict in his case, on the grounds that there was never any evidence against him to begin with. After looking at the facts, the judges ruled that Valle didn’t try to kidnap anyone—that he only made up stories on the Internet. He should not have spent 21 months in jail, then several months under house arrest, plus a year’s probation. “We are [loath] to give the government the power to punish us for our thoughts and not our actions,” the court declared in last week’s majority opinion. “That includes the power to criminalize an individual’s expression of sexual fantasies, no matter how perverse or disturbing.”

So Valle is free to talk at last. He can tell it like it is. And here’s how it is: The Cannibal Cop says he really has no interest in cannibalism. What about his Google searches, I ask, the ones that came up at his trial, for information on how to prepare human meat, where to find huge cooking trays, and how to cook a woman alive? What about the Microsoft Word document pulled from his home computer, much discussed by prosecutors, called “Abducting and Cooking Kimberly: A Blueprint”? These were research for the stories that he shared online, he says, and props for sharing with his interlocutors. They made his stories less repetitive. “That’s why people liked doing role-plays with me. I would get very detailed and focus on small things that other people wouldn’t.” Valle does like to imagine tying women up as if he meant to cook them, but he never dreams of taking knives to them or roasting human meat. He’s not turned on by blood and gore. In his fantasies, he’s less a butcher than a garde-manger.

I can’t imagine this distinction will do much to help Valle’s public image. (“He’s not a Cannibal Cop … he’s a Bondage and Domination Cop.”) But his openness suggests a turning point for someone whose most private thoughts have for years been turned against him, both in the courtroom and the media. At first Valle blamed himself for everything that happened. “Dan, I wake up every morning wanting to drive my head through the wall for being so stupid,” he emailed me from prison several years ago, shortly after his conviction. Later he would tell the judge that his behavior “lacked morality and circumspection” and that he was “an embarrassment.” Now that he’d learned his lesson, he implied, he could shut down the fetish-site accounts and go back to being normal.

Now, for the first time since I’ve known him, Valle shows signs of being more at ease with who he is and willing to declare that he’s not a monster or a fool. “I’ve been outed completely,” he says. “The skeletons are out of my closet.”

It’s Thursday night, less than half a day since the court’s decision, and Valle is giddy but exhausted. He gulps down three cups of coffee before I finish one, as he walks me through his version of the nightmare story that began when law enforcement showed up at his door.

For his first few days in jail, Valle didn’t realize that his wife had been the one who turned him in. She’d walked out on him six weeks earlier, after discovering the chats on a shared computer, but even as she headed out the door, with the laptop and their 1-year-old, it seemed to Valle that she still meant to work things out. From the elevator, he says, she texted that she still loved him and that she would not give up on their relationship.

At her parents’ house in Reno, Nevada, though, Valle’s wife looked more closely at the chats and read what Valle and his fetish pals said that they’d like to do to her (or, as Valle puts it, what they’d like to do to a “character” based on her). Frightened for her life, she brought the laptop to the FBI. Agents tracked Valle’s cell phone for a month and covertly entered his apartment to make a copy of the hard drive from another computer in their home.

When he saw the guns and badges and bulletproof vests, Valle thought it was a big misunderstanding, that he could explain it all away. The agents questioned him for hours, saying that they wanted to understand “the human element of all this,” and he did his best to help them. Then they said they’d been on his case for 18 months and that they had evidence that he was stalking women in real life. “That’s when I started to freak out,” Valle says.

For the next seven months, his life was hell. Valle was put in solitary confinement, for his own protection. (As a cop, he might be targeted by other inmates.) On his third day at the Metropolitan Correctional Center in Lower Manhattan, Hurricane Sandy hit New York: The prison lights blinked out for several minutes at a time, and the cellblock went on lockdown. His lawyers couldn’t visit him, and he had no communication with his family. Valle didn’t know that there had been a storm. He was scared and confused.

Other prisoners were let out for an hour every day for recreation, but Valle didn’t get that time—again, for his protection. So he spent every hour of every day by himself, less the time for morning showers every Monday, Wednesday, and Friday. For months he was not permitted to make phone calls; after that he got one 15-minute conversation every 30 days.

“I would fall asleep and dream of being in a patrol car, or I would dream about my daughter, and then I’d wake up and just lose it,” Valle says. When he was up, he worried over who would pay his rent, what would happen to his wife and child, what his parents thought of what he’d done, and when he might get out. He felt angry that he’d been locked up for nothing and also angry at himself for having gotten so involved in fetish role-plays.

Eventually the guards took pity on him, and one slipped a radio into his cell. Valle passed the time working on his case and listening to sports-talk shows on WFAN. At one point, he overheard the guy in the next cell asking the guards for more toilet paper. Valle, who was so out of sorts he wasn’t eating, had more toilet paper than he needed. He told the guards he’d like to share, and that got him talking to his neighbor through the wall.

The guy told him that all the other inmates knew his story and that he’d been a cop. Newspaper stories had been circulating. “But it sounds like a bullshit case,” the neighbor added.

“That was the first time I had any hope,” Valle says. “Here was someone other than my lawyer who was on my side.”

When the trial started in February 2013, Valle thought that everything would go his way. It seemed like the prosecution’s case was crumbling. Evidence that he’d been doing surveillance on an alleged victim’s home, based on cellphone tower pings, turned out to be ambiguous, and the judge excluded it.

It took the jury 16 hours in mid-March to reach a verdict in the case. Valle’s lawyer held his hand while the jurors rattled off their guilty votes. As the officers led him out of court, he looked back at his family. His mother shook her head and mouthed the words “stay strong,” but he couldn’t follow her advice. “I got back inside and started crying right away.”

No longer able to endure the endless hours by himself, Valle asked a prison captain for a move. He said he didn’t care if he got his ass kicked; anything was better than the loneliness of solitary. A prison supervisor reluctantly agreed and released Valle into the general population. “When I walked in, everyone stopped,” he says. “The whole place stopped. People were playing pingpong and it felt like even the pingpong ball stopped in midair and was staring at me.”

But no one ever got in his face. He kept to himself for a few days, then started making friends. He grew close to his cellmate; they talked a lot about their kids. It turned out that Valle had two competing identities in prison: He was a former cop, but he was also a guy who had gotten a very public raw deal from the legal system. For the other inmates, the latter trumped the former. Soon Valle had a job in the prison kitchen—the only one available at the time—and then got promoted to kitchen supervisor.

Life was getting better behind bars, but Valle still had trouble understanding how he’d ended up in this predicament. If no one had ever found his online chats, he says, he might have proceeded on a normal, uneventful course. Yes, he had a dark fantasy life that he kept secret from his wife. But he insists that things at home were pretty much OK. There were some conflicts in the marriage, but these were the sorts of things that came with having a new baby: Less time for physical intimacy, quibbles over how much time to spend with in-laws. “I was doing well,” he says. “I was a dean’s list student in college. I got a good job. I never missed work. I passed the sergeant’s test. Everything was going great.”

As for the chats, the government implied in court that they were getting more frequent and intense—that as time went on, Valle became increasingly obsessed with the violent fantasy scenarios. (In his closing statement, the prosecutor added that these scenarios could be held against him, even when they weren’t real. Imagining violence against women is “not normal,” he said. “That’s not a fantasy that’s OK.”) But Valle now insists that his online habits weren’t all that problematic. He still regrets sharing photos of women that he knew with role-play partners. He never gave out their full names or other identifying information, but he knows that doesn’t mean it wasn’t dangerous and unethical. Still, he says, the chats themselves were always “something I did when I was alone at home with not much else going on. It wasn’t like it was every day; it was once in a while. I never sat and said to myself, ‘Holy shit, I’m a sick fuck, let me get help,’ because it never affected my life. For me it was something on the side that was OK. … But obviously this stuff cost me my life,” he interrupts himself to add, as if just reminded of the fact. “Doing this stuff cost me everything.”

Fifteen months after his conviction, in the summer of 2014, the judge in Valle’s case took the extraordinary step of overturning the jury’s verdict. “[O]nce the lies and the fantastic elements are stripped away,” the judge wrote, “what is left are deeply disturbing misogynistic chats and emails written by an individual obsessed with imagining women he knows suffering horrific sex-related pain, terror and degradation.” This was not a ringing endorsement of Valle’s character, but it set him free.

Once out of prison, provisionally and pending the results of a government appeal, Valle had to manage the unruly fascination with his story in the media. Reporters mobbed the door of his mother’s house, where for several months he remained under home confinement. Photographers angled for a photo of the Cannibal Cop. Valle was humiliated: He already knew that his sexual fantasies and unusual porn habits had been revealed to college friends and former colleagues at the NYPD and to his parents and their friends, too. Now it felt like half the population of New York was familiar with his turn-ons. And most seemed to think they were repugnant.

Under the terms of his supervised release, Valle was banned from viewing online porn of any kind. He was barred from using a smartphone. He couldn’t go into Manhattan without permission (since that’s where he is supposed to have done surveillance on his victims). And he had to get a job.

This last requirement proved to be the hardest one. Valle applied to dozens of jobs for which he felt he was overqualified—at least 15 were administrative-assistant positions. But he never got a single call. He told his supervisor that his Google footprint made the job search impossible, but the only recourse was a two-week workshop for ex-convicts, where sometime criminals were taught to write résumés and what to wear to interviews. These were not Valle’s problems.

Then Valle tried to date again, but the post seeking a “non-judgmental” woman that he put on Match.com was quickly noticed by the tabloids—and mocked for the fact that his photo was one taken on the courthouse steps, moments after he was released from prison. “I didn’t really have any other pictures,” Valle says. “My computer’s with the FBI!” In what seemed to be another ill-considered choice, he noted that he loves to cook. I ask him at the diner if that wasn’t kind of weird, in retrospect. “Ironically enough, I’m very good at cooking,” he tells me. “You know what? Get over it.”

A documentary film about his case called Thought Crimes, filmed with his cooperation (and in which I appeared), aired on HBO in May. It didn’t make things any easier. The movie took no strong position on Valle’s innocence and through point-and-counterpoint debate suggested that, Valle’s legal status notwithstanding, a guy like him might well turn out to be a danger to society. (The movie also lingered over shots of Valle making dinner at his mother’s house.)

I met up for drinks with Valle several times in the months that followed, and though his case had taken an unexpected and miraculous turn for the better, he seemed uneasy and uncertain. The government appeal was still in play, and he had no idea when the decision might come down. On any given morning, everything that Valle had might be pulled away from him once more. When he went out he worried that he might be recognized and treated poorly. One night at a bar in Queens, a woman did approach the two of us to say she knew his face and that she’d studied him in school. She seemed more like a groupie than a heckler, and Valle wondered if I had set him up.

Therapy has helped with these anxieties, and he says things are going better now. For a while Valle had a girlfriend, someone who knew exactly what he’d done. (They’ve since broken up but remain in touch, he says.) He found a job at a construction company run by an old family friend; now he spends his days on job sites, shadowing the project managers and trying hard to learn the business. And he’s focused on his newest fight, to be reunited with his daughter. He hasn’t seen Josephine since his wife walked out in 2012. Now she’s 4 years old. “She always babbled a lot,” Valle says. “I’m sure she’s talking up a storm.”

In many ways, he’s starting fresh. While he was still in prison, his family chipped in to pay off his college debt, more than $16,000. “I came out, and it’s a whole different life,” he tells me. “Everything I had is gone. Everything—my home, my family, my job—and I’ve had to basically rebuild from scratch. It was like I was born again with nothing. No debt, nothing.” He seems a bit choked up as he talks about how much he owes his family and legal team. “You take it all in stride. It could be worse.”

But as we sit there in the diner, I’m less struck by the ways in which Valle’s changed than the ways in which he hasn’t. For the first time since I met him, he isn’t acting like his fantasies were wrong or that there might be something twisted in his soul. “I used to be more apologetic; I used to say I’m so sorry for doing this,” he tells me. “But as part of therapy I’ve learned it’s not like flicking off a switch, where all of a sudden the guy is going to say something to me and, boom, everything goes away. That’s not how it works.” He takes another sip of coffee. “It’s just like, I am who I am. I know I’m a good person. I know I would never hurt anybody.”