Maybe you have had the fantasy: Chuck your day job to teach in a public school in a blighted neighborhood. The money is lousy, of course, but that’s part of the fantasy — no one wants to turn around the lives of poor children just for a paycheck. Then you decide that maybe today is not the day, and go back to your life. Sound familiar?

Ed Boland went a step further. An executive at Prep for Prep, a nonprofit organization that places minority children in elite private schools, he quit to teach ninth-grade history at a low-performing public school on the Lower East Side of Manhattan. He had seen movies like “Dangerous Minds” and “Stand and Deliver,” in which heroic teachers reach into the lives of at-risk adolescents and make a difference. Mr. Boland believed he could be one of them.

“I thought, I can do this,” he said the other day, at a coffee shop near the Henry Street School for International Studies, where he arrived as a first-year teacher in fall 2006. “I thought, I want to work on the front lines. I want to be one of those teachers that kids really like and listen to and learn from, and you can turn a kid around.”

On his fifth day, as he describes it in his new memoir, “The Battle for Room 314: My Year of Hope and Despair in a New York City High School,” his students schooled him in just how wrong he was.