Richard Selzer, a surgeon who turned his operating-room experiences into fictional stories that blended the gore, the beauty and the absurdity of modern medicine, died on Wednesday in North Branford, Conn. He was 87.

His wife, Janet, confirmed his death.

Dr. Selzer’s lofty, old-fashioned style infused short stories, essays and memoir. His 1991 New York Times Magazine piece, “A Question of Mercy,” about an AIDS patient requesting assisted suicide, inspired a play of the same title by David Rabe, the Tony Award-winning playwright and screenwriter.

Dr. Selzer gave up medicine and turned to writing full time when he was 58.

“I noticed my dexterity was decreasing,” he told The Yale Daily News in 2011, “and I didn’t want to hurt anyone, and I also had wanted to become a writer. So I said, ‘I’m going to stop.’ ”

He said that when he started writing fiction, in his 40s, he wanted to write medically based stories that “could only have been written by a doctor or surgeon, and yet it would tell a story of human interest.” They were often based on his experiences, but with imaginative twists.