Mervyn LeRoy, the versatile movie director of such explosive dramas as ''Little Caesar'' and ''I Am a Fugitive From a Chain Gang'' and such lush romances as ''Waterloo Bridge'' and ''Random Harvest,'' died early yesterday at his home in Beverly Hills, Calif. He was 86 years old and had had Alzheimer's disease. 

Mr. LeRoy directed the musical ''Gold Diggers of 1933,'' the biographical ''Madame Curie,'' the wartime drama ''Thirty Seconds Over Tokyo,'' the religious epic ''Quo Vadis'' and the comedy ''Mister Roberts.'' He also produced 13 of his own movies and several for other directors, including the classic ''The Wizard of Oz'' in 1939. 

The movie maker was a short (5 feet 7 1/2 inches), gregarious and youthful-looking man whose main education was vaudeville from the age of 14. He believed emphatically that the aim of movies was to entertain. He read widely to find fresh material, and said his criteria for filming a subject were that ''it was believable, had a good, solid story and the quality I call 'heart.' '' 

In 1945, Mr. LeRoy received a special Oscar for a short documentary decrying intolerance, ''The House I Live In,'' which he directed and co-produced. In 1975, he won the Irving G. Thalberg Memorial Academy Award for career achievements. 

He set records: 20 of his films were shown at Radio City Music Hall, with ''Random Harvest'' running for 12 weeks. He made 75 movies over 40 years and boasted, ''I never repeated myself'' or ''made a major flop.'' 'A Lotta Feeling!' 

Vivien Leigh considered ''Waterloo Bridge'' her best film. Greer Garson, who starred in ''Random Harvest,'' said that ''Mervyn's favorite last-minute exhortation to his actors is a whispered, 'Now let's have a nice scene with a lotta feeling!,' and that rather sums up the way he works, the way he moves through life.'' 

He battled hard for his beliefs. In 1957, he fought successfully to curb studio influence in the Academy Awards by persuading academy officials to change a rule and allow the academy, not the studios, to choose whether a performer should be nominated as best actor or best supporting actor. He tried, without success, to have Oscar votes made public, contending that secret balloting was undemocratic. 

Mr. LeRoy was a keen, adaptable director who made mostly taut, punchy, socially critical films at Warner Brothers for a decade and then - for 14 years at M-G-M - mostly romantic, sentimental films, some of which were derided as pretentious, vulgar and complacent. He returned to Warner Brothers in 1954 and made generally superior films again. 

Among his earlier movies were ''Five Star Final'' (1931), ''Tugboat Annie,'' which was Marie Dressler's last film (1933), the musical ''Sweet Adeline'' (1935), ''Anthony Adverse'' (1936), ''They Won't Forget'' (1937), ''Escape'' (1940) and ''Blossoms in the Dust'' (1941). 

''They Won't Forget,'' an indictment of lynch mobs that starred Claude Rains, was praised by Frank Nugent of The New York Times as ''a grim and savage drama, courageous in its conception, relentless in its execution, uncompromising in its conclusion.'' Roses and Razzle-Dazzle
In early 1955 Mr. LeRoy took over the just-begun ''Mister Roberts'' from the ailing John Ford. Later LeRoy films include ''The Bad Seed'' (1956), ''No Time for Sergeants'' (1958), ''Home Before Dark'' (1958), ''The F.B.I. Story'' (1959), ''A Majority of One'' (1962) and ''Gypsy'' (1962) - a vaudeville musical that gave him a chance to display his penchant for roses and razzle-dazzle. 

The movie maker worked easily with such widely feared studio chiefs as Jack L. Warner and Louis B. Mayer and, by 1938, was earning $300,000 a year. He deplored latter-day Hollywood in a 1974 memoir, ''Mervyn LeRoy: Take One,'' written with Dick Kleiner. 

''Nowadays, movies aren't made by great creative minds,'' he wrote, ''but by a cartel of businessmen on the one hand and a haphazard group of young and undisciplined rookies on the other. Today's films are made too fast and too dirty and cost either too much or too little. Too many directors today make movies that puzzle and offend and confuse the audience. They seem to equate bafflement with art.'' 

Mervyn LeRoy was born on Oct. 15, 1900, in San Francisco, the only child of Harry LeRoy, a department-store owner, and the former Edna Armer. His mother left when he was 5 to marry a hotel-reservation salesman, Percy Teeple, and his father's store was destroyed by the 1906 earthquake. The insurance companies went bankrupt; his father lost his spirit and had trouble supporting his family; he died in 1916. 

The youth had to sell newspapers at the age of 12 and then, at 14, sold papers by day and acted evenings in a stock company, where he perfected a Charlie Chaplin imitation. He then appeared in vaudeville for nine years, touring in the major national circuits under diverse billings, including ''The Singing Newsboy,'' ''The Boy Tenor of the Generation'' and, with a pianist, Clyde Cooper, for three years as ''LeRoy and Cooper, Two Kids and a Piano.'' 'Mervyn Mothball'
At the age of 23, he got a bit part in a movie in Fort Lee, N.J., and became intrigued by film directing. A cousin, the movie pioneer Jesse L. Lasky, got him a job in Hollywood as a wardrobe handler, with a weekly salary of $12.50. The job made him invariably reek of mothballs, and friends at his rooming house soon dubbed him ''Mervyn Mothball.'' He gained a transfer to the studio laboratory, working with dyes for film tinting. They discolored his skin, and friends began to call him ''Rainbow.'' 

Over five years, he was variously an assistant cameraman, bit player, featured actor and gag writer. In 1928, he directed his first film, ''No Place to Go,'' a silent marital comedy starring Mary Astor. He quickly shot nine more movies, three of them silent and six talkies, mostly forgettable farces. But he became a director to watch when he filmed ''Little Caesar,'' a riveting 1930 expose of a vicious mobster (Edward G. Robinson). The movie rocked the nation and spawned a spate of gangster films. His niche was secured by ''I Am a Fugitive From a Chain Gang,'' a 1932 tragedy about an innocent engineer (Paul Muni) who is brutalized into becoming a thief. The film had a stunning impact and prompted major reforms in laws and prison conditions. 

In World War II, he made a dozen public affairs shorts for the Government on such subjects as contending with bombs and putting out fires, to prepare Americans for a possible attack. 

Mr. LeRoy made movies zestfully, intensely and meticulously. On the set, he usually insisted on silence, but often relieved tension with practical jokes. He was tactful with performers as he sought their best efforts. 

For many years, he owned thoroughbred race horses, and served as president of the Hollywood Park race track. 

In a statement from the White House last night, President and Mrs. Reagan said: 

''Mervin LeRoy was a special part of our lives. It was he who introduced us and he was always a precious friend. In fact, we always referred to him as our Cupid. 

''Mervin LeRoy was one of the pillars of the entertainment industry, responsible for some of the finest motion pictures ever. He was one of the greatest directors and producers of all time, knowing exactly how a scene should be and knowing just what to say to get his actors to make it right. 

''He was dedicated to his profession and brought unmatched enthusiasm and energy to everything he did. He achieved excellence and earned the respect and affection of everyone he worked with.''
Mr. LeRoy was married briefly in the late 1920's to Edna Murphy, a film actress. From his 11-year marriage to Doris Warner, the daughter of Harry M. Warner - one of the three Warner brothers - he is survived by a son, Warner, a New York restaurateur; a daughter, Linda Janklow of New York City; two stepdaughters, Rita Roedling of Beverly Hills and Eugenia Bucci-Casari of Rome, and six grandchildren. He is also survived by his third wife, the former Katherine Spiegel, whom he married in 1946. 

A funeral service will be held on Wednesday at 2 P.M. at Forest Lawn Memorial Park in Glendale, Calif. 

photo of scene from 'Little Caesar'; photo of scene from 'Waterloo Bridge'; photo of scene from 'Mister Roberts'