Born in Malden, Massachusetts, Gardner graduated from Palo Alto High School in 1909, and received his only formal legal education at Valparaiso University School of Law in the state of Indiana. He attended law school for approximately one month, was suspended from school when his interest in boxing became a distraction, then settled in California where he became a self-taught attorney and passed the state bar exam in 1911. He opened his own law office in Merced, California, then worked for five years for a sales agency. In 1921, he returned to the practice of law, creating the firm of Sheridan, Orr, Drapeau and Gardner in Ventura, California.
In 1912, he wed Natalie Frances Talbert; they had a daughter, Grace. Gardner practised at the Ventura firm until 1933, when The Case of the Velvet Claws was published. Much of that novel was set at the historic Pierpont Inn, which was just down the road from his law office.
Gardner gave up the practice of law to devote full-time to writing. In 1937 he moved to Temecula, California, where he lived for the rest of his life. In 1968 he married his long-time secretary Agnes Jean Bethell (1902–2002), the "real Della Street".
He died on March 11, 1970, in Temecula, California. His ashes were scattered over the Baja California Peninsula.
Gardner's ranch was known as Rancho del Paisano at the time. It was variously described as being 700 acres (2.8 km2), 1,000 acres (4.0 km2), or 3,000 acres (12 km2) and was sold after his death to a Newport Beach couple. In 2001, the ranch was resold to the Pechanga Band of Indians, renamed as Great Oak Ranch and eventually joined to the Pechanga reservation.
In 2003, Temecula Valley Unified School District named a newly opened middle school after Gardner.
The Case of the Velvet Claws
(1933), 1953 U.S. paperback edition
Innovative and restless in his nature, Gardner was bored by the routine of legal practice, the only part of which he enjoyed was trial work and the development of trial strategy. In his spare time, he began to write for pulp magazines, which also fostered the early careers of Dashiell Hammett and Raymond Chandler. His first story was published in 1923. He created many different series characters for the pulps, including the ingenious Lester Leith, a parody of the "gentleman thief" in the tradition of Raffles; and Ken Corning, a crusading lawyer who was the archetype of his most successful creation, the fictional lawyer and crime-solver Perry Mason, about whom he wrote more than eighty novels. With the success of Perry Mason, Gardner gradually reduced his contributions to the pulp magazines, gradually withdrawing from the pulps until the medium itself became extinct in the 1950s. Thereafter he still published a few short stories in the "glossies" such as Collier's, Sport's Afield, and Look. However the majority of his postwar magazine writings were non-fiction articles on travel, Western history, and forensic science.
In his early years writing for the pulp magazine market, Gardner set himself a quota of 1,200,000 words a year. He was a two-finger typist, but later turned to dictating his stories to a team of secretaries.
Gardner also devoted thousands of hours to a project called "The Court of Last Resort", which he undertook with his many friends in the forensic, legal and investigative communities. The project sought to review and, if appropriate, to reverse, miscarriages of justice against possibly innocent criminal defendants who were originally convicted owing to poor legal representation; or to the inadequate, careless or malicious actions of police and prosecutors; or most especially, because of the abuse or misinterpretation of medical and other forensic evidence. The resulting 1952 book earned Gardner his only Edgar Award, in the Best Fact Crime category.
The character of Perry Mason was portrayed in various Hollywood films of the 1930s and 40s, and a long-running radio program from 1943 to 1955. "When Erle Stanley Gardner was reluctant to allow CBS to transform Mason into a TV soap opera, (CBS) created The Edge of Night. For that latter enterprise, John Larkin, radio's best identified Mason, was cast as the protagonist-star, initially as a detective, eventually as an attorney, in a thinly veiled copy of Mason."
Gardner also created characters for the radio programs Christopher London (1950), starring Glenn Ford, and A Life in Your Hands (1949–1952). "As on other Gardner-inspired narratives, someone else actually penned the scripts."
Eventually Perry Mason became a long-running TV series with Raymond Burr as the title character. Gardner himself made an uncredited appearance as a judge in the final episode of the original series titled "The Case of the Final Fade-Out." In the late 1980s and early 1990s, Mason was revived for a series of made-for-TV movies featuring surviving members of the original cast, including Burr.
Under the pen name A. A. Fair, Gardner wrote a series of novels about the private detective firm of Bertha Cool and Donald Lam. He also wrote another noteworthy series of novels about District Attorney Doug Selby and his opponent, the rascally Alphonse Baker Carr. This series is an inversion of the motif of the Perry Mason novels, with prosecutor Selby being portrayed as the courageous and imaginative crime solver and his perennial antagonist A.B. Carr being a wily shyster whose clients are always "as guilty as hell".
The Harry Ransom Humanities Research Center currently archives Gardner's manuscripts. The library has constructed a miniaturized reproduction of his study room.
Gardner held a lifelong fascination with Baja California and his written works became an authority on the early exploration of the Mexican peninsula. He used various modes of transportation to traverse Baja, including boat, oversized trucks, airplane and even helicopter.
In a real murder trial case in Arizona, the district attorney used The Case of the Curious Bride as the basis for his line of questioning. According to the Gardner Mystery Library (Walter J. Black, Inc.): "The Arizona murder trial was going badly for the district attorney. He knew the accused was guilty; but because of a quirk in the law, he had no hope for a conviction. Then, one day, the district attorney called the suspect's wife to the stand and started an unexpected line of questioning. When the judge demanded an explanation, the district attorney produced The Case of the Curious Bride by Erle Stanley Gardner. In it, he said, Perry Mason used the same questioning. The judge withdrew to his chambers, and when he returned, he allowed the district attorney to proceed with his ingenious approach. It changed the course of the trial and led to a verdict of 'Guilty.