The best-selling American author of the 20th century at the time of his death, Gardner also published under numerous pseudonyms, including A.A. Fair, Kyle Corning, Charles M. Green, Carleton Kendrake, Charles J. Kenny, Les Tillray and Robert Parr.
Born in Malden, Massachusetts, Erle Stanley Gardner graduated from Palo Alto High School in California in 1909 and enrolled at Valparaiso University School of Law in Indiana. He was suspended after approximately one month when his interest in boxing became a distraction. He returned to California, pursued his legal education on his own, and passed the state bar exam in 1911.
In 1912, Gardner wed Natalie Frances Talbert; they had a daughter, Grace. He opened his first law office in Merced in 1917, but closed it after accepting a position at a sales agency. In 1921, he returned to law as a member of the Ventura firm Sheridan, Orr, Drapeau, and Gardner, where he remained until 1933.
Gardner enjoyed litigation and the development of trial strategy, but was otherwise bored by legal practice. In his spare time, he began writing for pulp magazines; his first story was published in 1923. He created many series characters for the pulps, including the ingenious Lester Leith, a parody of the "gentleman thief" in the tradition of A. J. Raffles; and Ken Corning, crusading lawyer, crime sleuth, and archetype for his most successful creation, Perry Mason. In his early years writing for the pulp magazine market, Gardner set himself a quota of 1,200,000 words a year. When asked why his heroes always defeated villains with the last bullet in their guns, Gardner answered, "At three cents a word, every time I say ‘Bang’ in the story I get three cents. If you think I’m going to finish the gun battle while my hero still has fifteen cents worth of unexploded ammunition in his gun, you’re nuts". Early on, he typed his stories himself using two fingers, but later dictated them to a team of secretaries.
Under the pen name A. A. Fair, Gardner wrote a series of novels about the private detective firm of Cool and Lam. In another series, District Attorney Doug Selby litigated against attorney Alphonse Baker Carr in an inversion of the Perry Mason scenario. Prosecutor Selby is portrayed as a courageous and imaginative crime solver; his antagonist A. B. Carr is a wily shyster whose clients are invariably "as guilty as hell".
Gardner remained with Sheridan, Orr, Drapeau, and Gardner until 1933, when The Case of the Velvet Claws was published. Much of that story is set at the historic Pierpont Inn, just down the road from his law office. In 1937, Gardner moved to Temecula, California, where he lived for the rest of his life.
With the success of the Mason series, which eventually ran to over 80 novels, Gardner gradually reduced his contributions to the pulp magazines until the medium itself died in the 1950s. Thereafter, he published a few short stories in the "glossies" such as Collier's, Sports Afield, and Look, but the majority of his postwar magazine contributions were nonfiction articles on travel, Western history, and forensic science. Gardner's readership was a broad and international one, and included the English novelist Evelyn Waugh, who in 1949 called Gardner the best living American writer.
Gardner also created characters for various radio programs, including Christopher London (1950), starring Glenn Ford, and A Life in Your Hands (1949–1952). He created Perry Mason as a recurring character for a series of Hollywood films of the 1930s, and then for a titular radio program, which ran from 1943 to 1955. In 1954, CBS proposed transforming Perry Mason into a television soap opera. When Gardner opposed the idea, CBS created The Edge of Night, featuring John Larkin—who voiced Mason on the radio show—as a thinly veiled imitation of the Mason character.
In 1957, Perry Mason became a long-running CBS-TV series starring Raymond Burr in the title role. Though Burr originally auditioned for the role of district attorney Hamilton Burger, Gardner reportedly declared he was the embodiment of Perry Mason. Gardner made an uncredited appearance as a judge in "The Case of the Final Fade-Out" (1966), the last episode of the series.
Gardner and his first wife had separated in the early 1930s, and after her death in 1968, Gardner married Agnes Jean Bethell (1902–2002), his secretary since 1930. The character of Della Street was a composite of Jean and her two sisters, Peggy and Ruth, who also worked as secretaries for Gardner.
He held a lifelong fascination with Baja California and wrote a series of nonfiction travel documentaries describing his extensive explorations of the peninsula by boat, truck, airplane, and helicopter.
Gardner devoted thousands of hours to "The Court of Last Resort", in collaboration with his many friends in the forensic, legal, and investigative communities. The project sought to review, and when appropriate, reverse miscarriages of justice against criminal defendants who had been convicted due to poor legal representation, abuse, or misinterpretation of forensic evidence, or careless or malicious actions of police or prosecutors. The resulting 1952 book earned Gardner his only Edgar Award, in the Best Fact Crime category, and was later made into a TV series, The Court of Last Resort.
Gardner died on March 11, 1970, at his ranch in Temecula—the best-selling American writer of the 20th century at the time of his death. He was cremated and his ashes scattered over his beloved Baja California peninsula. The ranch, known as Rancho del Paisano at the time, was sold after his death, then resold in 2001 to the Pechanga Indians, renamed Great Oak Ranch, and eventually absorbed into the Pechanga reservation.
The Harry Ransom Center at the University of Texas at Austin holds Gardner's manuscripts, art collection, and personal effects. From 1972 to 2010, the Ransom Center featured a full-scale reproduction of Gardner's study that displayed original furnishings, personal memorabilia, and artifacts. Although the space and a companion exhibition were dismantled, a panoramic view of the study is available online.
In 2003, a new school in the Temecula Valley Unified School District was named Erle Stanley Gardner Middle School.
In December 2016, Hard Case Crime published The Knife Slipped, a Bertha Cool-Donald Lam mystery which had been lost for 75 years. Written in 1939 as the second entry in the Cool-Lam series, the book was rejected at the time by Gardner's publisher. Published for the first time in 2016, as a trade paperback and ebook, the work garnered respectful reviews.