William Schallert was born in Los Angeles, California, the son of Edwin Francis Schallert, a longtime drama critic for the Los Angeles Times, and Elza Emily Schallert (née Baumgarten), a magazine writer and radio host. He began acting while a student at the University of Southern California in Los Angeles but left to become an Army Air Corps fighter pilot in World War II. He returned to UCLA after the war and graduated in 1946. In 1946, he helped found the Circle Theatre with Sydney Chaplin and several fellow students. In 1948, Schallert was directed by Sydney's father, Charlie Chaplin, in a staging of W. Somerset Maugham's Rain.
Schallert appeared in supporting roles on numerous television programs starting in the early 1950s, including four episodes (and three different characters) in Dick Powell's Zane Grey Theatre between 1958 and 1961. He was in three episodes of The Rifleman and four episodes of Gunsmoke : season 3, episode 16 "Twelfth Night" in 1957, season 4, episode 16 "Gypsum Hills Feud" in 1958, and as Col. Grant in season 7, episode 27 "Wagon Girls" in 1962, and banker Ezra Thorpe in "The Money Store" season 14 ,episode 14. Schallert portrayed farmer Sam Becker in a 1961 episode of The Andy Griffith Show, whose newborn son is delivered by Andy. He appeared in The Partridge Family as a very humble folk-singing guitar player in "Stage Fright", in 1971. He appeared three times as Major Karl Richmond on NBC's Steve Canyon, starring Dean Fredericks in the title role.
Schallert also appeared in several movies. One of his early cinematic roles was a brief uncredited performance as a police detective in The Reckless Moment (1949) with Joan Bennett and James Mason. He had roles in The Man from Planet X (1951) with Robert Clarke, The Tarnished Angels (1958) with Robert Stack, Blue Denim (1959) with Brandon deWilde, Pillow Talk (1959) with Doris Day and Rock Hudson, Speedway (1968) with Elvis Presley, The Jerk (1979) with Steve Martin, Teachers (1984) with Nick Nolte, and Innerspace (1987), in which he played Martin Short's doctor. Schallert also played (uncredited) an ambulance attendant in the early minutes of the 1950s sci-fi classic Them! (1954). He was a founding member of the Circle Players at The Circle Theatre, started in 1946, now known as El Centro Theatre.
Schallert starred in Philbert, an innovative 1964 television pilot for ABC, which combined live-action camera work and animation. Created by Warner Bros. animator Friz Freleng and directed by Richard Donner, ABC backed out of the series shortly before full production was to begin, although the completed pilot was released in theaters by Warner Brothers as a short subject.
Schallert was probably best known as Martin Lane on The Patty Duke Show. He also appeared as a wise teacher, Mr. Leander Pomfritt, on The Many Loves of Dobie Gillis and as "The Admiral" on Get Smart. On the two former shows he worked opposite actress Jean Byron. Schallert made three guest appearances on CBS's Perry Mason between 1957–1962, including the role of Donald Graves in the series' fifth episode "The Case of the Sulky Girl" and as Dr. Bradbury in the 1961 episode "The Case of the Misguided Missile". He played the role of Nilz Baris in the Star Trek episode "The Trouble with Tribbles"; and much later he portrayed Varani, a Bajoran musician, in the Star Trek: Deep Space Nine episode "Sanctuary".
Schallert played the role of Carson Drew in the television series The Hardy Boys/Nancy Drew Mysteries (1977–1979), featuring Pamela Sue Martin as Nancy Drew. In addition to his onscreen performances, Schallert did voice-over work for numerous television and radio commercials over the years. Among these were a recurring role as "Milton the Toaster" in animated commercials for Kellogg's Pop-Tarts. He had the distinction of appearing in both the original movie version of In the Heat of the Night (1967) and the later NBC TV version in 1992. In 2004, TV Guide recognized Schallert's portrayal of Martin Lane on The Patty Duke Show as No. 39 on its list of "50 Greatest TV Dads".