Gary was born Roman Kacew (Yiddish: רומן קצב Ruman Katseb, Russian: Рома́н Ле́йбович Ка́цев, Roman Leibovich Katsev) in Vilnius (at that time in the Russian Empire). In his books and interviews, he presented many different versions of his parents' origins, ancestry, occupation and his own childhood. His mother, Mina Owczyńska (1879—?), was a Russian Actress from Švenčionys (Svintsyán) and his father was a businessman named Arieh-Leib Kacew (1883—1942) from Trakai (Trok), also a Lithuanian Jew. Arieh-Leib abandoned the family in 1925 and remarried. Gary later claimed that his actual father was the celebrated actor and film star Ivan Mosjoukine, with whom his Actress mother had worked and to whom he bore a striking resemblance. Mosjoukine appears in his memoir Promise at Dawn. Deported to central Russia in 1915, they stayed in Moscow until 1920. They later returned to Vilnius and moved on to Warsaw; when Gary was fourteen, he and his mother moved to Nice, France. Converted to Catholicism by his mother, Gary studied law, first in Aix-en-Provence and then in Paris. He learned to pilot an aircraft in the French Air Force in Salon-de-Provence and in Avord Air Base, near Bourges.
Of almost 300 cadets in his class, and despite completing all parts of his course successfully, Gary was the only not to be commissioned as an officer; he believed that the military establishment was distrustful of what they saw as a foreigner and a Jew. Training on Potez 25 and Goëland Léo-20 aircraft, and with 250 hours flying time, after three months' delay he was made a sergeant on 1 February 1940. Lightly wounded on 13 June 1940 in a Bloch MB.210, he was disappointed in the armistice; after hearing General de Gaulle's radio appeal, he decided to go to England. After failed attempts, he flew to Algiers from Saint-Laurent-de-la-Salanque in a Potez. Made adjutant upon joining the Free French and serving on Bristol Blenheims, he saw action across Africa and was promoted to second lieutenant. He returned to England to train on Boston IIIs. On 25 January 1944, his pilot was blinded, albeit temporarily, and Gary talked him to the bombing target and back home, the third landing being successful. This and the subsequent BBC interview and Evening Standard newspaper article were an important part of his career. He finished the war as a captain in the London offices of the Free French Air Forces. As a bombardier-observer in the Groupe de bombardement Lorraine (No. 342 Squadron RAF), he took part in over 25 successful sorties, logging over 65 hours of air time. During this time, he changed his name to Romain Gary. He was decorated for his bravery in the war, receiving many medals and honours, including Compagnon de la Libération and commander of the Légion d'honneur. In 1945 he published his first novel, Education européenne. Immediately following his Service in the war, he worked in the French diplomatic Service in Bulgaria and Switzerland. In 1952 he became the secretary of the French Delegation to the United Nations. In 1956, he became Consul General in Los Angeles and became acquainted with Hollywood.
Gary's first wife was the British Writer, Journalist, and Vogue Editor Lesley Blanch, author of The Wilder Shores of Love. They married in 1944 and divorced in 1961. From 1962 to 1970, Gary was married to American Actress Jean Seberg, with whom he had a son, Alex Andre Diego Gary. According to Diego Gary, he was a distant presence as a father: "Even when he was around, my father wasn't there. Obsessed with his work, he used to greet me, but he was elsewhere."
He is the only person to win the Prix Goncourt twice. This prize for French language literature is awarded only once to an author. Gary, who had already received the prize in 1956 for Les racines du ciel, published La vie devant soi under the pseudonym Émile Ajar in 1975. The Académie Goncourt awarded the prize to the author of that book without knowing his identity. Gary's cousin's son Paul Pavlowitch posed as the author for a time. Gary later revealed the truth in his posthumous book Vie et mort d'Émile Ajar. Gary also published as Shatan Bogat, Rene Deville and Fosco Sinibaldi, as well as his birth name Roman Kacew.
In addition to his success as a Novelist, he wrote the screenplay for the motion picture The Longest Day and co-wrote and directed the film Kill! (1971), which starred his wife at the time, Jean Seberg. In 1979, he was a member of the jury at the 29th Berlin International Film Festival.
Gary died of a self-inflicted gunshot wound on 2 December 1980 in Paris. He left a note which said that his death had no relation to Seberg's suicide the previous year. He also stated in his note that he was Émile Ajar.