On a hot summer day two years ago, soon after the Islamic State had declared its caliphate, Mr. Morton received a letter from Syria. It was from one of his former students, who enthusiastically described how he had spent the morning swimming in the Tigris, just after the Islamic State had routed the Iraqi military in Mosul and hung the decapitated heads of enemies from a fence.

Instead of sharing his recruit’s excitement, Mr. Morton threw up inside his cell.

“This is a person who was my student, literally called me with every single question he had, and I said, ‘Go to Syria,’ ” he recalled. “It’s like Frankenstein. I didn’t create it, but I certainly contributed to it.”

Mr. Morton continued working undercover until he was outed as an informant by The Washington Post. By then, the judge had reduced his 11-year sentence to three years and nine months. He walked out on Feb. 27, 2015.

He now lives in Virginia, and the terms of his release prevent him from traveling outside the greater District of Columbia area. On Monday, when classes resume at George Washington University, Mr. Morton will be there, too, in his role as a researcher.

Still, he said, at night he is gripped by fear.

The extremists he turned his back on could try to harm him — the Islamic State considers spying a form of apostasy, punishable by death. Mostly, though, he worries about the ideas he unleashed on the world.

“I’m scared — not because I think I’ll go back, but because of what’s coming,” he said. “I was so committed to destroying the world that I lived in, and now, for rational reasons, I realize that international order needs to be protected.”