“This was not the planned book,” Alyson Hagy says of her third novel and seventh book, Boleto (Graywolf, May). “I was working on another novel and sitting in a lecture and this book just came to me,” she says, about remembering an encounter she once had with a ranch hand.

The book that would become Boleto began there. The protagonist, Will Testerman, is a 23-year-old horse whisperer who tries to change his life, and luck, by buying a young filly and taking her from his family’s farm in Wyoming to the polo fields of California. Will’s father calls him “the dreamer” (translation: screwup), and Will hopes that this beautiful horse that he names Boleto (Spanish for ticket) will be his ticket out. As a counterpoint to the story of the filly is the question repeatedly asked by Will’s mother, who is dying of breast cancer: “Who are you today, Will Testerman? What will you be today?”

As in other recent works, like her fourth story collection, Ghosts of Wyoming (Graywolf, 2010), Hagy, an English professor at the University of Wyoming at Laramie, writes about the 99 percenters of the West, not just modern-day cowboys like Will, who are being crowded out by wealthy landowners and oil and gas companies. Hagy views Will as a skilled craftsman, whose trade is horses; he’s just trying to get by. His father does the same, working a full-time printing job to hold on to the family farm; his mother is a teacher.

Hagy, 51, first met her prototype for Will at a ranch nearly a decade ago. “I watched this young guy. He had a beautiful filly, and he said, ‘I trained a lot of roping horses, and I want to do something different.’ He said he wanted to try to train polo horses,” Hagy explains. “I don’t know what happened to him. The book came to me in 2009. It was a long incubation period.”

Hagy grew up on a farm in Virginia’s Blue Ridge Mountains, where her parents still live. She met her first mentor, Richard Ford, at Williams College, where he was her thesis adviser. She had planned to study medicine. “I never thought of writers as being live people,” she says. But that changed at Williams when she was introduced to Flannery O’Connor, Katherine Ann Porter, and Eudora Welty, and their voices got stuck in her head. “For Richard Ford, writing was deadly serious. You were either in or you were out. If you get an idea for a novel, you should try to talk yourself out of it, he advised. Writing was hard work. He called it a ‘curse.’ If you really need to write, it will let you know, was his theory.” Aware that she was “cursed,” Hagy went on to get an M.F.A. from the University of Michigan in 1985, then taught creative writing in Charlotteville, Va. She returned to Michigan to teach writing and then, in 1996, headed west to her current job at the University of Wyoming.

Each of the places where Hagy has lived appear in her stories and novels. “Search Bay,” selected for the 1997 Best American Short Stories, is set in Michigan’s Upper Peninsula, and other stories take place in North Carolina’s Outer Banks. But the West is more than just another locale for Hagy; it has come to define her. “The landscape of the West speaks to me in a different way than the Blue Ridge. My style is more austere living in the West,” she says. “I don’t think I’m done with Wyoming yet. It’s brought more clarity to my sentences. My husband would say, ‘It’s so damned cold; it freezes the excess.’ ”

Yet her stripped-down prose is also lyrical, as in this passage from Boleto: “The things that never changed for him were the details of home. The furl of light on the tin roof of the barn. The contours of the two-track that ran along the edge of the meadow, all the way to the property line.... These were the truths that were fixed inside him. They hung like well-used tools on a workshop wall.”