Günter Grass, the German novelist, social critic and Nobel Prize winner whom many called his country’s moral conscience but who stunned Europe when he revealed in 2006 that he had been a member of the Waffen-SS during World War II, died on Monday in the northern German city of Lübeck, which had been his home for decades. He was 87.

His longtime publisher, Gerhard Steidl, said that he had learned late Sunday that Mr. Grass had been hospitalized after falling seriously ill very quickly. The cause of death was not announced.

Mr. Steidl said he drank his final schnapps with Mr. Grass eight days ago while they were working together on his most recent book, which he described as a “literary experiment” fusing poetry with prose. It is scheduled to be published in the summer.

“He was fully concentrated on his work until the last moment,” Mr. Steidl said.

Mr. Grass was hardly the only member of his generation who obscured the facts of his wartime life. But because he was a pre-eminent public intellectual who had pushed Germans to confront the ugly aspects of their history, his confession that he had falsified his own biography shocked readers and led some to view his life’s work in a different light.