MALIBU, CALIF. -- Director Hal Ashby, whose versatile style shaped the acclaimed films "Harold and Maude," "Being There" and "Coming Home," died of liver cancer yesterday. He was 59.

Ashby, who was working on his new movie, "Hand Carved Coffins," died at home, said business manager Larry Reynolds.

Ashby directed film stars such as Jack Nicholson in "The Last Detail" and Peter Sellers in "Being There." His other critical and commercial successes included "Shampoo" with Warren Beatty and Julie Christie, and "Bound for Glory," in which actor David Carradine chronicled the life of folk singer Woody Guthrie.

Ashby directed his first film, "The Landlord," with Beau Bridges and Pearl Bailey, in 1970. Two years later he directed "Harold and Maude," which became a cult classic.

"Hal had a genius for finding the humor and beauty in the most unlikely places," said Bud Cort, who starred in "Harold and Maude," a black comedy about a young man fascinated with death who fell for a life-loving woman, played by Ruth Gordon, who was old enough to be his grandmother.

Ashby's antiwar film, "Coming Home," a story of a paraplegic's return from Vietnam, won Oscars in 1978 for the film's stars, Jane Fonda and Jon Voight. Bruce Dern, playing a traumatized Marine officer, was nominated for best supporting actor.

Ashby himself won a 1967 Academy Award for his work as film editor in "In The Heat of the Night," which was directed by Norman Jewison.

His editing collaboration with Jewison also was seen in "The Cincinnati Kid" and "The Russians are Coming, the Russians are Coming."

In a 1982 interview, Ashby described himself as an optimist. "I basically have a very positive philosophy on life, because I don't feel I have anything to lose. Most things are going to turn out okay."

Ashby, who was born in 1929 in Ogden, Utah, hitchhiked to southern California in 1950. Soon after his arrival, he became an apprentice editor at the Republic and Disney studios. He later became an assistant to editor Robert Swink, collaborating on the editing of "The Big Country," "The Diary of Anne Frank" and "The Greatest Story Ever Told."

Ashby's work was often marked by deep affection for popular music, as reflected in "Bound for Glory" and "Let's Spend the Night Together," a concert film featuring the Rolling Stones.