Shelby Foote, 88, the novelist and historian whose three-volume study of the Civil War and appearances on the PBS series "The Civil War" brought him national celebrity, died June 27 at Baptist Hospital in Memphis, his city of residence. He had had a heart attack after a recent pulmonary embolism.

Mr. Foote was a college dropout, a court-martialed Army veteran of World War II, a testy and provocative personality and an acclaimed novelist.

He was called William Faulkner's heir apparent for his early fictional work, often grim and gothic tales from his native Mississippi that focused on farmers, gamblers and assorted ne'er-do-wells.

"The Civil War: A Narrative," released between 1958 and 1974, was written with a literate flair, a mournful lyricism that underscored the human agony of battle, defeat and victory. He received darts for the books' perceived failings as an academic undertaking; he didn't bother with footnotes and touched only vaguely on larger themes of the war's origin and ramifications.

Mr. Foote answered his critics by saying: "My hope was that if I wrote well enough about what you would have seen with your own eyes, you yourself would see how those things, the politics and economics, entered in. I quite deliberately left those things out. My job was to put it all in perspective, to give it shape. Look at Flaubert: He didn't criticize Emma Bovary as a terrible woman; he didn't judge her; he just put down what happened."

Honey-voiced, sporting a full beard and drawing from a seemingly endless well of war anecdotes, he became a star of Ken Burns's 11-hour public television documentary, which aired in 1990. Described as gregarious, he nevertheless disliked the torrent of sudden interest in his life. He told People magazine, "What I do requires steady work and isolation from all this hoorah."

Mr. Foote wrote relentlessly for hours at a time with an old-fashioned dipped pen. When he finished a project, he always rewarded himself by rereading Marcel Proust, whose "Remembrance of Things Past," he noted, had 1,250,000 words.

He proudly added that his Civil War volumes numbered 1,655,000 words.

Shelby Dade Foote Jr. was born Nov. 17, 1916, in Greenville, Miss. He inherited colorful ancestors, including frontiersmen, gamblers who squandered fortunes and soldiers who fought for the Confederacy.

His father, a supervisor for Armour Meats, died during a medical procedure, and he was raised by his mother. As a child, Mr. Foote was often lonely and took to reading everything from Tarzan to Tom Swift. He found Charles Dickens's "David Copperfield" a particular delight. Drawn to English classes, he was otherwise a proudly lackluster student at the University of North Carolina, saying that seeking good grades was like bowing to authority.

He said the peak of his college career was a surprise visit he made to Faulkner with his close friend, the future novelist Walker Percy. Pulling up to Faulkner's home in Oxford, Miss., Percy was too shy to enter the house, but Foote knocked on the door, stayed several hours and apparently never bothered to tell Faulkner of his friend in the car.

A much-admired collection of his correspondence with Percy appeared in 1997.

Mr. Foote served in the Army in Europe during World War II. While stationed in Belfast, he was court-martialed for an unauthorized visit to his Irish girlfriend -- later his first wife -- who lived two miles beyond the official military limits.

His postwar career was varied but inauspicious, including a brief stint as a reporter for a newspaper in Greenville. Later, Mr. Foote said that journalism offered a great grounding in fast writing, "but I don't think one should stay in it too long if what he wants to be is a serious writer."

His first novel, "Tournament" (1949), was followed by two more books set in Mississippi and colored by fatalism, "Follow Me Down (1950) and "Love in a Dry Season" (1951).

"Shiloh" (1952), set during the 1862 Civil War battle in Tennessee in which about 24,000 were killed or wounded, blended fiction with fact and used multiple characters to describe the action.

Random House founder Bennett Cerf, who had admired "Shiloh," asked Mr. Foote to write a short history of the war, but Mr. Foote insisted that nothing less than three volumes would do -- and he warned that his work might take four years to complete.

To Mr. Foote, the project became akin to "swallowing a cannonball" as he researched and wrote and struggled through his Civil War books for exciting details. During this period, he held author-in-residence positions at the Arena Stage in Washington, the University of Virginia and Hollins College in Roanoke.

Mr. Foote said he had an avowed preference for the South during the Civil War, and his perspectives on the South proved controversial. He was a man of conscience who was repulsed by racial segregation but also admired those who fought for the Confederacy under the banner of "states' rights" -- a slogan often usurped by racists during the civil rights era.

Entering the debate over the Confederate battle flag, he denounced the "knotheads down home -- the Ku Kluxers and the rest of them" who "misused" its significance. He added: "I know that flag really pains black people. It was used against them in a dastardly way, and they hate it. And I understand their hating it. But they are wrong."

His final book was "September, September" (1977), the story of a racially motivated kidnapping set in Memphis during the 1957 integration of Little Rock's Central High School.

Over the years, he liked to tell people he was working on a sprawling novel that he called "Two Gates to the City." The book was nonexistent, but it served as a good red herring. He later said, "People ought not write when they are old."

In private, Mr. Foote enjoyed cooking and was a friend of New York Times food critic Craig Claiborne. He told Claiborne he preferred recipes, such as boiled beef with veal knuckle, that "required more time than kitchen talent, long-drawn-out dishes that cook for hours and are easy to do." Some of his recipes provided him one of his lesser-known publishing credits: the Memphis Junior League cookbook.

His marriages to Tess Lavery and Peggy DeSommes ended in divorce.

Survivors include his wife, Gwyn Ranier, whom he married in 1956, a daughter from his second marriage, Margaret Foote, and a son from his third marriage, Huger Foote, all of Memphis.

Southern novelist Shelby Foote gained fame as a historian in part through a PBS documentary.