Nelson Algren, 72, the author of "A Walk on the Wild Side" and "The Man With the Golden Arm," who was known for his harsh, gritty and sometimes brutally realistic depiction of life on Chicago's underside, died yesterday in Sag Harbor, N.Y.

Mr. Algren, a winner of the 1950 National Book Award, who was hailed by one eminent American literary critic as "the poet of the Chicago slums," was found dead in his home by a gust arriving for a party to celebrate the author's forthcoming induction into the American Academy of Arts and Letters.

The cause of death was not immediately known. Mr. Algren has been hospitalized for two weeks after a heart attack in December 1979. On Friday he had complained of a heaviness in his chest and was examined by a physician.

A native of Detroit, who grew up in the shadow of the "El" in a Polish immigrnt community on Chicago's west side, Mr. Algren a few years ago forsook the city that shaped his fiction to move to New Jersey to tell the story of boxer Rubin (Hurricane) Carter, imprisoned there on a triple murder, imprisoned there on a triple murder conviction.

After six years in Paterson, N.J., Mr. Algren moved to Sag Harbor on Long Island's north shore, because he said he wanted to live near the water.

A graduate of the University of Illinois, where he studied journalism, Mr. Algren finished his studies in the middle of the depression and never spent more than three weeks working for a newspaper.

Instead, he began a period of drifting about the South and the Southwest, working as a door-to-door salesman and as a migratory laborer.

Stranded in 1933 in an abandoned filling station in Rio Hondo, Tex., Mr. Algren wrote a short story. It was called "So Help Me," and he sent it to Whit Burnett, who published it in "Story."

That marked the start of Mr. Algren's career as a writer. However, his subsequent literary efforts were not as quickly rewarded. "Somebody in Boots" (1935) was his first novel.It was a work of social protest about homeless depression youth, and it sold 750 copies.

It took "Never Come Morning" (1942), a hard-hitting story of crime and proverty on Chicago's west side for Mr. Algren's ability and importance as a novelist of the realistic school to be recognized.

A rather shy and unpretentious man who recalled that during World War II he "went in the Army a private, stayed three years, came out a private," Mr. Algren won the National Book Award for "The Man With the Golden Arm," a violent yet compassionate Chicago-based story of a drug-addicted dealer in a gambling club. The book was made into a movie with Frank Sinatra and Kim Novak.

"A walk on the Wild Side," a 1956 best seller, was likened by one eminent critic to Sherwood Anderson's naturalistic classic "Wineburg, Ohio," with the small-town folk replaced by "demented slub dwellers."

The book was evocatively titled. Mr. Algren said the name derived from a song he once heard on a juke box: "Walking on the Wild Side of Life." He said: "I've stayed pretty much on that side of the curb. . . ."

Mr. Algren was known also for a prose poem, "Chicago: City on the Make." That appeared in 1951. "A Walk on the Wild Side" was his last published novel.

He had been married and divorced twice.