Joe Louis, 66, whose ferocity and legendary punching power made him the heavyweight boxing champion of the world for 12 years and an American folk hero whose memory will endure as long as courage and grace are remembered, died of cardiac arrest yesterday at Desert Spring Hospital in Las Vegas.

He had been confined to a wheelchair since undergoing heart surgery in 1977. In recent years he had worked as a greeter at the Caesars Palace hotel and gambling emporium in Las Vegas and often was introduced on national television at prizefights there. On Saturday night he attended the heavyweight title fight between Larry Holmes and Trevor Berbick.

In his own professional career, Mr. Louis fought 71 fights, won 68, including 54 by knockouts, and lost three. He won the heavyweight championship with an eighth-round knockout of James J. Braddock on June 22, 1937, in Chicago. He defended his title 25 times, winning 22 of those encounters by knockouts. The three challengers he decisioned were Tommy Farr of England, Arturo Godoy of Chile and Jersey Joe Walcott. He knocked out Godoy and Walcott in rematches.

Some of his fights were among the most memorable in ring history. They included his second fight with the German Max Schmeling, who had beaten him in 12 rounds in 1936. On June 22, 1938, Mr. Louis and Schmeling climbed through the ropes in Yankee Stadium before a crowd of 70,000. It was over in one round. Schmeling was hit so hard and so often in that short time that he had to spend a week in a hospital.

Before that fight, Mr. Louis was invited to the White House by President Franklin D. Roosevelt. The president asked the boxer to lean over so he could feel the Louis biceps. "Joe, we need muscles like your to beat Germany," Roosevelt said. Indeed, with Hitler in power, the contest between the German idol and the American black from Alabama had taken on symbolic overtones for many people in the United States.

Other great fights of his included the two bouts with Billy Conn, whom he fought both before and after four years of World War II service in the Army, and his second fight against Walcott, who had lost an unpopular decision in 1947. On June 25, 1948, again at Yankee Stadium, "the Brown Bomber," then 34 years old and beginning to show it, summoned up the old ferocity and knocked Walcott out in the 11th round.

On March 1, 1949, Mr. Louis announced his retirement. He said he would do promotional work for the newly formed International Boxing Club.

"I'm glad to retire," he told reporters. "It takes a load off my mind. I could see that I couldn't fight anymore and rather than lose the title in the ring, I decided to quit."

It was estimated that Mr. Louis earned about $5 million during his career. He lost or gave away almost all of it -- tax bills stemming from one of his divorces eventually totaled $1.2 million, including interest.

The need for money brought him out of retirement. On Sept. 27, 1950, he fought Ezzard Charles, the new champion, and was badly beaten in 15 rounds.

"I'll never fight again," Mr. Louis said.

But he was back in action before the end of the year. He won six fights. The seventh -- and the last -- was fought in Madison Square Garden in New York City on Oct. 26, 1951. His opponent was a fearsome brawler from Brockton, Mass., named Rocky Marciano. "The Brockton Brawler" absorbed "the Bomber's" jabs in the early rounds and sent him sprawling on the canvas in the eighth round. It was all over.

Marciano later told his opponent he was sorry to have defeated his childhood idol.

In his prime, Mr. Louis was a surpassingly graceful boxer. He did not go in for any of the tricks, shenanigans, dances, "rope-a-dopes" or other antics that later became the trademarks of the great Muhammad Ali. Rather, he stalked his opponents like a panther, his face expressionless. When he saw his chance, there would be a quick flurry of punches. Usually, that ended it. His purpose, he used to say, was to put his opponents away "just as soon as I catch 'em."

When his ring career was over, Mr. Louis had a variety of jobs, including a period as a professional wrestler and referee. Debt and his tax problems continued to dog him. The Internal Revenue Service, with the approval of Congress, finally forgave him his taxes in 1960.

Joe Louis Barrow was born in Lafayette, Ala., on May 13, 1914. His widowed mother, Lilly Barrow, moved to Detroit when he was a child. He attended trade school and later worked on an automobile assembly line before becoming an amateur boxer. He dropped the Barrow from his name when he went into the ring and won the National AAU 175-pound title. As an amateur he knocked out 43 of his 54 opponents and lost four decisions.

He turned professional in 1934 and scored the first of his 54 knockouts when he put away a local favorite, Jack Kracken, in one round in Chicago. In three years he was the world champion. Mr. Louis had two managers to begin with. They were Julian Black of Chicago and John Roxborough of Detroit. His first trainer was the great Jack Blackburn. After Blackburn's death, his trainer was Manny Seamon.

By any measure, Mr. Louis was one of the most popular champions in history. At a time when much of America was segregated, the appeal of Joe Louis leapt across the color line. For himself, Mr. Louis said he thought that Jack Dempsey was the greatest heavyweight in history and that Dempsey could have beaten him.

Mr. Louis was married four times -- twice to his first wife, Marva Trotter, by whom he had a daughter, Jacqueline, and a son, Joe Louis Barrow Jr. (Their first marriage took place on Sept. 24, 1935, a few hours before he knocked out Max Baer in Yankee Stadium). They were divorced in 1945 and married again in 1949. In 1955 he married Rose Morgan, a cosmetics manufacturer. That marriage was annulled. His last marriage was to Martha Malone Jefferson, a Los Angeles lawyer.

Some of Mr. Louis' tax problems began with his first divorce from Marva Trotter. Instead of alimony, it was decided that she should receive one quarter of his manager's share, Julian Black having been dropped from the managerial team. Marva Louis thus shared in the fighter's largest purse -- $625,916 for the second Billy Conn fight. Years later the IRS ruled that this payment actually was alimony, on which Mr. Louis should have paid taxes, rather than a managerial fee. This is the tax problem that eventually grew to more than $1 million and which the government eventually forgave him, saying it would "not chase Joe Louis and make his life miserable anymore."

If there was misery in his later years, there also were memories. About his fights with Schmeling, Mr. Louis said:

"Schmeling had knocked me out in the 12th round two years earlier. He caught me with a right hand flush on the jaw in the fifth. He hit me with a few more rights and I went down. He also hit me at the bell. I never remembered a single thing after that. He saw something in that first fight. I was throwing a left hook and was a sucker for an overhand right. I corrected that in the second fight because Chappie [trainer Jack Blackburn] got me a bunch of sparring partners who did nothing but hammer me with right hands.

"Anyway, I caught Schmeling with a left hook and followed with a right in the first round. I knocked him down and kept punching him until the fight was stopped at 2:04 in the first round."

Mr. Louis once was floored by a second-rate heavyweight named Tami Mauriello. Tony Galento, the New Jersey bartender known as "Two-Ton Tony," also had him on the deck, with a left hook. Joe Walcott set him down twice in their first bout in Madison Square Garden, New York, in 1947. That was the night Walcott lost an unpopular decision. Buddy Baer knocked Mr. Louis through the ropes in the only fight he had in Washington.

But the trick was to keep Mr. Louis on the canvas. He had tremendous recuperative powers and courage to go with it.

It was during a presentation of an award as fighter of the year that New York's debanair and flowery Mayor Jimmy Walker observed: "You have been a great American . . . you have laid a rose on Abe Lincoln's grave."

When the United States went into World War II, Mr. Louis was asked how he could fight for the United States. "We're on God's side," he replied. "Besides," he added, "there ain't nothing wrong with this country that Hitler can cure."

In the Army, Mr. Louis was in the same unit as Jackie Robinson, who in 1947 became the first black man of modern times to play major-league baseball. The world champion protested to his commanding general that Robinson had been barred from the post athletic teams because he was black. The "oversight" was remedied, but by that time Robinson had been sent to officers' school.

During his military service, Mr. Louis fought an estimated 96 exhibitions before 2 million servicemen in the United States, North Africa, Italy and elsewhere. When he was discharged, he received the Legion of Merit, a rare honor for an enlisted man, "for exceptional meritorious conduct."

For all his popularity, Mr. Louis sometimes was accused of being an "Uncle Tom." Indeed, he played no highly visible role during the civil rights movements of the 1950s and 1960s, but he vehemently denied that he was not an out-and-out supporter of black Americans in their struggle for equality. Black Muslims were an exception for him.

"I am against Black Muslims," Mr. Louis said in 1964, "and I'm against Cassius Clay [Muhammad Ali] being a Black Muslim. I'll never go along with the idea that all white people are devils. I've always believed that every man is my brother. I was born a Baptist and I'll die a Baptist.

"Sometimes I wish I had the fire of a Jackie Robinson to speak out and tell the black man's story.

"I've never been on a picket line or in jail or anything like that. But I donated money to the NAACP, CORE, the Urban League and to Martin Luther King, who was my friend. I also have been at many benefits to raise money for these groups. The way I see it, the Black Muslims want to do just what we have been fighting against for 100 years. They want to separate the races and that's a step back at a time we're going for integration."

Although Mr. Louis worked for Muhammad Ali to help promote some of Ali's early fights, the two never liked each other. Ali was among those who sometimes called Mr. Louis an "Uncle Tom."

Mr. Louis had a hard time financially and physically in his last years. He frequently was hospitalized for chest pains. He said they were the result of a wrestling bout. "I did some wrestling after I quit the ring," he explained, "and one night a 360-pound guy named Cowboy Rocky Lee stepped on my chest and damaged some of the heart muscles."

In 1970 Mr. Louis was confined to a hospital for psychiatric treatment after he became depressed. His son Joe Jr., then a Denver law student, committed him. That sparked a testimonial for him in Detroit that raised about $75,000, put in a trust fund.

Mr. Louis celebrated his 63rd birthday in Washington in May 1977. A year later, Frank Sinatra organized a star-studded gala in Las Vegas for Mr. Louis' 64th birthday. It was a time to remember his triumphs in the ring and forget his troubles outside it. Mr. Louis was confined to a wheelchair on the stage in front of the 2,000 guests in Caesars Palace.

Among those present was Ali, who said: "In a room like this, I am not the greatest. Louis is."