Rock Hudson, 59, the handsome and stalwart leading man of such major Hollywood films as "Giant," the 1956 saga of Texas oil and cattle wealth that won him an Academy Award nomination as best actor, died yesterday at his home in Beverly Hills, Calif. He had AIDS (acquired immune deficiency syndrome).

"Giant" began a remarkably successful string of film credits for Mr. Hudson, whose popularity was confirmed in the 1958 remake of Ernest Hemingway's "A Farewell to Arms" and the 1959 comedy "Pillow Talk," the first of three hit romantic comedies that costarred Doris Day.

From 1971 to 1977, he was the star and executive producer of the popular television series "McMillan and Wife," in which he played an urbane and unflappable police commissioner. The series reportedly earned him $1.6 million annually.

Last season he appeared in six episodes of the TV series "Dynasty," and he recently made a television special with Doris Day. In 1981, he won praise from TV critics for his portrayal of an agonized U.S. president in "World War III."

For a decade after "Giant," Mr. Hudson was one of the top movie box office attractions in the world. In 1957, he was named No. 1 in a poll of exhibitors conducted by the trade publication Motion Picture Herald. He repeated this success in 1959 and maintained either a second or third place ranking for all but one of the next five years.

He achieved movie stardom despite admittedly modest ability. His first, unsuccessful screen test became a standing Hollywood joke when used as a "How Not to Act" instructional reel at 20th Century-Fox. However, Mr. Hudson's good looks, sturdy physique and aura of resolute heroic sincerity and dignity combined with gradually improving skills and good roles to make his career.

His opportunity arrived when a sizeable segment of the filmmaking community desired an alternative to notoriously moody or "difficult" new stars like Marlon Brando and James Dean. The assumption that the audience also desired an alternative to these personalities was borne out at the box office.

In "Giant," the richly detailed movie version of Edna Ferber's best-seller about a Texas ranching dynasty, director George Stevens shrewdly exploited different audience tastes by casting Dean and Mr. Hudson in antagonistic leading roles.

Rock Hudson was born Roy Scherer Jr. in Winnetka, Ill., on Nov. 17, 1925. His father, an automobile mechanic, and his mother, who had worked as a telephone operator, were hard pressed to make ends meet with the onset of the Depression. The marriage ended in divorce in 1932 and Mr. Hudson's mother remarried a year later. The boy took the last name of his stepfather, Wallace Fitzgerald. This marriage also failed, ending in divorce in 1942, and Mr. Hudson spent a good deal of time living with his maternal grandmother in Winnetka.

He graduated from New Trier High School. Though evidently drawn to acting, his faulty memory and awkward readings prevented him from being cast in school dramatic productions. He enlisted in the Navy for World War II service and was sent to the Philippines.

After the war, he took up residence in Los Angeles. He tried to attract the attention of movie producers by hanging around the front gates of the studios and dispatching portfolios of glossy photographs to talent agents.

One of these, Henry Willson, who specialized in aspiring young actors (his clients included Tab Hunter, Rory Calhoun, Guy Madison, Robert Wagner and John Saxon), agreed to represent Mr. Hudson and, supposedly inspired by a combination of the Rock of Gibraltar and the Hudson River, changed the newcomer's name from Roy Fitzgerald to Rock Hudson.

Placed under contract to Universal studios in 1949, Mr. Hudson appeared in 28 movies over the next five years. His breakthrough role was in "Magnificent Obsession" in 1954, a hit tear-jerker that costarred Jane Wyman. George Stevens gave Mr. Hudson stature as a serious actor by casting him in "Giant."

His popularity peaked in 1959 with the surprise hit "Pillow Talk," a frothy, underrated sex comedy that allowed both Mr. Hudson and Doris Day to change their images by adding playful sophistication to their familiar wholesomeness.

The success of "Pillow Talk" made follow-up films a foregone conclusion. The team was reunited in "Lover Come Back" in 1962 and "Send Me No Flowers" in 1964. While not in the same superlative league as William Powell and Myrna Loy, Cary Grant and Irene Dunne, or Spencer Tracy and Katharine Hepburn, the Hudson-Day match struck incongruous but irresistibly amusing romantic comedy notes.

Mr. Hudson slipped from the top 10 listings in 1965 and never returned, although he still played an occasional leading movie role. The "McMillan and Wife" series preserved his popularity.

In the 1970s he made his stage debut, appearing opposite Carol Burnett in a revival of "I Do! I Do!" This belated approach to musical comedy also led to performances as King Arthur in "Camelot" and as Oscar Jaffe, a bombastic theatrical producer, in "On the Twentieth Century."

Mr. Hudson was married to Phyllis Gates, a secretary to Henry Willson, in November 1955. They were divorced in August 1958.