DETROIT, JULY 11 -- Pvt. Eddie D. Slovik came home today to be buried beside his beloved bride, 42 years after he became the only U.S. soldier to be executed for desertion since the Civil War.

In a country that prefers to celebrate its heroes, some 50 mourners clutching miniature American flags gathered around a simple gravesite here to remember someone who considered himself a born loser. They were watched by at least as many reporters and members of television news crews as they bade farewell to a 24-year-old Polish American who was "shot to death with musketry," in the words of the applicable Army regulations, because he refused to fight.

Transformed by a best-selling book and a television movie into a symbol of the unwilling soldier throughout the ages, "Private Eddie" has achieved in death a notoriety he never had in life.

"Eddie's only crime was that he could not kill anyone, and that is one of the 10 Commandments," said Robert Definis, a Pennsylvania public relations consultant who has campaigned for 13 years for a posthumous presidential pardon for Slovik.

"He got a raw deal," said John Tankey, Slovik's closest buddy during the war, recalling how he had tried unsuccessfully to persuade his friend not to desert. "They wanted to make an example out of someone, and Eddie was it."

A Polish-American Army veteran, Bernard Calka, paid $3,500 to have Slovik's remains shipped back to Detroit from eastern France. At the interment, the gold-topped coffin was embossed with the seal of the United States of America, but plans to wrap it in the Stars and Stripes were dropped following protests by local veterans' organizations.

The son of poor immigrants who spent much of his youth in a reform school, Slovik was drafted to fight in the front lines in France despite initially being declared unfit for active duty. After twice deserting his unit, he was condemned to death by court-martial and executed by firing squad Jan. 31, 1945.

The execution was approved by Gen. Dwight D. Eisenhower, the supreme allied commander, who wanted to deter other potential deserters during the German counterattack known as the Battle of the Bulge. In fact, it probably had little deterrent effect. It was kept secret from other Army units, and it was not until long after the war that the circumstances of Slovik's death became widely known.

Slovik's supporters claim that successive U.S. administrations showed callousness in refusing his impoversished widow, Antoinette, the pension and health insurance she would have received had he not died, as the Army put it, "under dishonorable conditions." She died in 1979 shortly before Congress was to consider legislation that would have allowed her to receive benefits.

As many as 1 million Americans are believed to have deliberately avoided active military duty in World War II. Of the 21,049 Americans who deserted during the war, 49 were sentenced to death. All but Slovik were pardoned.

According to William Bradford Huie, whose 1954 book, "The Execution of Private Slovik," sold 5 million copies, "Eddie Slovik is the only American to be executed since 1864 for the crime of avoiding a duty."

The uniqueness of the occurrence and the human frailty of the central figure, as revealed in letters to his wife, have inspired numerous other investigations into the Slovik case over the years. Martin Sheen played the part of Slovik in a 1974 NBC drama.

The image of an individual buffeted by forces beyond his control was reinforced when Trans World Airlines shipped the black box containing Slovik's remains to San Francisco by mistake.

The body had been exhumed, at Calka's expense, from a special section of a U.S. military cemetary in eastern France, where it had been buried alongside 94 murderers and rapists.

Slovik's journey from a depressed Polish community in Michigan to the killing fields of eastern France and back again is as American, in its peculiar way, as those of the many heroes buried on the honored side of the Oise-Aisne cemetery. But Slovik was a dropout who could not meet society's demands, who loved his wife more than his country.

In his last letter to Antoinette, to whom he had been married less than two years, he wrote, "Everything happens to me. I've never had a streak of luck in my life. The only luck I had in my life was when I married you. I knew it wouldn't last because I was too happy. I knew they wouldn't let me be happy."

Slovik's supporters have argued that his prewar record as a petty criminal could have been a factor in the Army's decision to make an example of him. In 1937, he was convicted of embezzlement for taking $59.60 worth of candy, chewing gum and cigarettes from the Detroit drugstore where he worked.

The man described by his wife as "the unluckiest poor kid who ever lived" was slim, 5 feet 8 inches tall and socially awkward. While other recruits went out drinking during training camp in Texas, Slovik preferred to write home to Antoinette, sometimes as often as four times a day. He was later to replace the ammunition in his Army belt with stationery.

"Darling, try your best to keep your chin up and be a good soldier even if I ain't," he wrote just before leaving for the front. "You know your dreams are just like mine. A big house, nice furniture, a big car -- the best that money can buy. Our dream of having a baby around the house, mommy, that's all we want."

On the boat to Europe, Slovik told his friend Tankey that there was little point cleaning his rifle because he never intended to use it.

"He told me he would never fire a gun as long as he lived. He lived up to that promise," recalled Tankey, a fellow Pole from Detroit who was wounded in the Battle of the Bulge.

"Slovik was an average, likable young man," said retired Army major Edward P. Woods, the court-appointed defense attorney who has appealed for the case to be reopened. "He wasn't surly; he wasn't sullen. He simply didn't want to go into the front lines."

Charges of cowardice are resented by Slovik's supporters, who say he showed great courage in the way he faced the execution squad. According to the Roman Catholic priest who administered last rites, "Slovik was the bravest man {present} that morning."

Gen. Norman (Dutch) Cota, commanding officer of 28th Division in which Slovik served, later described the execution as "the roughest 15 minutes" of his life. This was from a man who took part in the D-Day landings, urging his troops onward with the words, "There are only two types of Americans on this beach -- dead ones and those who soon will be unless we move forward."

Anna Kadlubowski, 73, Slovik's sister-in-law, and her husband, John, who attended today's service, thanked President Reagan for allowing the body to be returned home.

Several of the mourners said that the campaign to reopen the case will continue. According to Definis, who first became interested in Slovik after a chance meeting with Woods in a supermarket, newly discovered documents show that the original court martial did not take into account an amended confession by Slovik. "This is like round one in a long battle," said Definis, who took out a loan on his house in order to raise funds to clear Slovik's name. "We have pardoned everyone from Richard Nixon to Tokyo Rose to Axis Sally to Patty Hearst to Jimmy the Greek. The only ones that haven't been pardoned yet are Hitler and Eddie."

For the moment, though, the quiet satisfaction in the Slovik camp over the return of his remains was best summed up by the twin inscriptions in Detroit's Woodmere Cemetery:

The first, on the grave of Antoinette Slovik, reads: "Sept. 7, 1979. Compassion and justice until this moment unfulfilled."

The second, on the grave of Pvt. Eddie D. Slovik, reads: "Feb. 18, 1920 -- Jan. 31, 1945. Honor and Justice prevailed."