To Mr. Vonnegut, the only possible redemption for the madness and apparent meaninglessness of existence was human kindness. The title character in his 1965 novel, “God Bless You, Mr. Rosewater,” summed up his philosophy:

“Hello, babies. Welcome to Earth. It’s hot in the summer and cold in the winter. It’s round and wet and crowded. At the outside, babies, you’ve got about a hundred years here. There’s only one rule that I know of, babies — ‘God damn it, you’ve got to be kind.’ ”

Mr. Vonnegut eschewed traditional structure and punctuation. His books were a mixture of fiction and autobiography, prone to one-sentence paragraphs, exclamation points and italics. Graham Greene called him “one of the most able of living American writers.” Some critics said he had invented a new literary type, infusing the science-fiction form with humor and moral relevance and elevating it to serious literature.

He was also accused of repeating himself, of recycling themes and characters. Some readers found his work incoherent. His harshest critics called him no more than a comic book philosopher, a purveyor of empty aphorisms.

With his curly hair askew, deep pouches under his eyes and rumpled clothes, he often looked like an out-of-work philosophy professor, typically chain smoking, his conversation punctuated with coughs and wheezes. But he also maintained a certain celebrity, as a regular on panels and at literary parties in Manhattan and on the East End of Long Island, where he lived near his friend and fellow war veteran Joseph Heller, another darkly comic literary hero of the age.

Mr. Vonnegut was born in Indianapolis in 1922, a fourth-generation German-American and the youngest of three children. His father, Kurt Sr., was an architect. His mother, Edith, came from a wealthy brewery family. Mr. Vonnegut’s brother, Bernard, who died in 1997, was a physicist and an expert on thunderstorms.

During the Depression, the elder Vonnegut went for long stretches without work, and Mrs. Vonnegut suffered from episodes of mental illness. “When my mother went off her rocker late at night, the hatred and contempt she sprayed on my father, as gentle and innocent a man as ever lived, was without limit and pure, untainted by ideas or information,” Mr. Vonnegut wrote. She committed suicide, an act that haunted her son for the rest of his life.

He had, he said, a lifelong difficulty with women. He remembered an aunt once telling him, “ ‘All Vonnegut men are scared to death of women.’ ”