“I always thought the hitch would be with the U.S. government, not the Canadians,” Mr. Baker said. He had convinced himself that freedom was imminent. Now he was marooned in New Jersey.

Coming to terms with the prospect of spending years in prison, he started to teach yoga. He dispensed investing advice to guards. He got a landscaping job on the prison grounds. His monthly pay was $18, a few dollars of which were earmarked to pay down his $155 million debt.

And he began writing about his experience. Not knowing how his tale would end, he finished with a fictional scene in which he was reunited with his father on the shore of a lake where he had sailed as a boy.

Then, after Mr. Baker had spent nearly six years incarcerated in America, Canada elected a new government, and Mr. Baker sensed an opportunity. Perhaps the new administration would have a more positive attitude about prisoner transfers.

He reapplied. And this time, it worked.

On May 10, 2016, another letter arrived, this one from Ottawa. Canada’s public safety minister, it said, “has approved your transfer to Canada.”

Last fall, Mr. Baker rode a bus across the Canadian border to a minimum-security prison. He could cook for himself, and go fishing. Two months later, his case manager called him to ask: “Do you want to go home?”

It was his mother’s birthday. The prison gave him a winter jacket and a bus ticket to Toronto. On the bus, Mr. Baker borrowed a passenger’s cellphone and called his father.