Daniel Keyes, the author of “Flowers for Algernon,” the story of a man with an I.Q. of 68 who temporarily becomes a genius after surgery — a book that inspired the film “Charly,” starring Cliff Robertson — died on Sunday at his home in South Florida. He was 86.

The cause was complications of pneumonia, his daughter Leslie Keyes said.

The premise underlying Mr. Keyes’s best-known novel struck him while he waited for an elevated train to take him from Brooklyn to New York University in 1945.

“I thought: My education is driving a wedge between me and the people I love,” he wrote in his memoir, “Algernon, Charlie and I” (1999). “And then I wondered: What would happen if it were possible to increase a person’s intelligence?”

After 15 years that thought grew into the novella “Flowers for Algernon,” which was published in The Magazine of Fantasy and Science Fiction in 1959 and won the Hugo Award for best short fiction in 1960.