Born to a Jewish family, Bergman graduated from Binghamton University and earned a Ph.D. in American history from the University of Wisconsin-Madison.
His dissertation, a study of Depression-era Hollywood films, was published in 1971 by NYU Press under the title We're in the Money: Depression America and Its Films. He wrote James Cagney: The Pictorial Treasury of Film Stars.
Bergman broke into the film industry by writing the original screenplay (titled Tex X) that served as the basis for Mel Brooks's classic Blazing Saddles (1974), and was among the co-writers who adapted it into its final state.
He wrote a gangster film Rhapsody in Crime that was never made. Warner Bros approached him to write a sequel to Freebie and the Bean with Peter Falk and Alan Arkin. Instead Bergman came up with The In-Laws (1979).
The In Laws was a success so Bergman could direct his next script, So Fine (1981) starring Ryan O'Neal. It was a box office disappointment.
Bergman wrote Oh God, You Devil! (1984) and Fletch (1985) starring Chevy Chase. The latter was a big hit. Less successful was Big Trouble (1986).
He wrote and directed The Freshman (1990) starring Marlon Brando and Matthew Broderick and did a rewrite on Soapdish (1991). He executive produced a number of movies including Chances Are (1989), White Fang (1991), Undercover Blues (1993) and Little Big League (1994).
Bergman wrote and directed Honeymoon in Vegas (1992) starring Nicolas Cage, James Caan and Sarah Jessica Parker ; and It Could Happen To You (1994) starring Nicolas Cage and Bridget Fonda.
He wrote The Scout although he says the resulting film is different from his version.
Bergman wrote and directed Striptease (1996) starring Demi Moore; and directed the Jacqueline Susann biopic Isn't She Great (2000) starring Bette Midler and Nathan Lane.
He has written four novels: The Big Kiss-Off of 1944, Hollywood and LeVine, Tender Is LeVine, and Sleepless Nights. He also wrote the Broadway comedy, Social Security, and Working Title.
The Andrew Bergman History Writing Prize is awarded by the University of Wisconsin.
In 2007, Bergman received the Ian McLellan Hunter Award for Lifetime Achievement in Writing from the Writers Guild of America.
He lives in New York City with his wife. He has two grown sons.