Schwartz wrote for some of the best known comedians of the era, including Lucille Ball, Groucho Marx, and Bob Hope. Schwartz was also one of the head writers for Gilligan's Island, a CBS sitcom which was created by his late brother, Sherwood Schwartz.
Schwartz was born in Passaic, New Jersey, on June 23, 1923. His brothers included Al Schwartz and Sherwood Schwartz. He moved to the Bronx with his family, where he attended school. He attended New York University and enlisted in the United States Air Force as an NYU student. He spent two years in the Air Force before moving to Los Angeles with his family. He wrote for radio in California and then moved back to New York City. He wrote for game shows in New York during the 1950s before returning to Los Angeles.
Schwartz screenwriting credits included numerous television sitcoms, game shows, and dramas. He wrote scripts and other material for You Bet Your Life, a quiz show hosted by Groucho Marx, as well as The $64,000 Question during the 1950s. His work on television dramas included The Six Million Dollar Man and It Takes a Thief during the late 1960s and 1970s.
Schwartz is perhaps best known for his work as a principal writer for Gilligan's Island, which aired from 1964 to 1967. In 1964, Schwartz's brother, Sherwood Schwartz, hired his brother to write and edit the scripts for his upcoming series about a group of seven castaways stranded on an island after a "three-hour tour." Elroy Schwartz noted in a later interview that many of the show's writers didn't think the sitcom would work due to its unrealistic premise, saying "They couldn’t believe you could get 30 episodes out of seven people stranded on an island." In addition to the series, Schwartz also penned the scripts for several of Gilligan's Islands television movies, including the two-part 1978 film, Rescue from Gilligan's Island, The Castaways on Gilligan's Island in 1979, and The Harlem Globetrotters on Gilligan's Island in 1981.
Outside of television, Schwartz was a licensed hypnotherapist with an office in Palm Springs. He also pursued in past life regressions, painted, and authored several non-fiction and fictional books.
Schwartz was a longtime resident of Palm Springs, California for more than thirty years. He died from complications of surgery at Odyssey House in Palm Desert, California, on June 14, 2013, at the age of 89 (just nine days short of his 90th birthday). He was survived by his wife of 67 years, Beryl, their two daughters, Nan Schwartz and Jill Moramarco, and one granddaughter.