The film was released in the United States on Kumail Nanjiani and Emily V. Gordon's tenth wedding anniversary.
Kumail Nanjiani personally contacted Anupam Kher about taking the role of his father, Azmat. Kher accepted the role after learning that Nanjiani's real father personally expressed a desire for him to take the role.
While writing the script, Kumail Nanjiani wanted his on-screen family to reflect the jokey and humorous traits of his real family. He bemoaned that so many Muslim characters were so frequently depicted as overly serious, and he aimed to avoid that stereotype.
The screenplay for this movie was written by Emily V. Gordon and her husband Kumail Nanjiani, and it was loosely based on the real-life courtship before their marriage in 2007. According to Nanjiani, the idea to make a script about them was first inspired by the film's eventual co-producer, Judd Apatow, when the two met while appearing in a 2012 episode of the "You Made It Weird" podcast. Developed over the course of three years, the script was called semi-autobiographical because, in addition to the two lead characters modeled after them, many of the events occurring during Gordon and Nanjiani's relationship were noted as being portrayed to an extent in the film. Though not part of the original script, a real-life incident involving Holly Hunter heckling an unnamed player during a U.S. Open tennis match inspired a similar scene in the film where Nanjiani's character is heckled during one of his stand-up sets.
While searching for funding, the producers submitted the script to a variety of potential studios. Within three hours of submission, FilmNation made an offer to fund the whole movie, no strings attached.
Emily V. Gordon: co-writer and the "real" Emily can be seen in the last scene of the film in the comedy club sitting near CJ and Mary.