Romain Gary, 66, a romantic and tragic figure who overcame the obscure origins of his birth in Eastern Europe and an impoverished boyhood in France to become a successful writer, film director and diplomat, was found dead of a self-inflicted gunshot wound yesterday in his apartment on the Left Bank in Paris.

Police said he died of a single gunshot wound to the head and that he had left a suicide note. The contents of the note were not available last night.

But news agencies quoted unidentified friends who said Mr. Gary was depressed about the death of Sept. 8, 1979, of actress Jean Seberg, his second wife and the mother of his son, Diego, now 17. Miss Seberg's naked body was found in her car. Medical examiners said she died of overdoses of alcohol and barbiturates.

Like her husband, Miss Seberg was a supporter of the civil rights movement in the United States and made this support manifest by financial contributions to the radical Black Panther Party. In 1970, the FBI planted stories in the press stating that she was pregnant by a Black Panther.

Miss Seberg first gained note as Joan of Arc in the Otto Preminger film "Saint Joan." As a result of the FBI stories, she went through a martyrdom in her own life. The stories so distressed her that she had a miscarriage. She took the body of the child, a girl, home to Marshalltown, Iowa, where it was displayed in a glass casket. The baby was white.

The bureau later admitted that it had undertaken to "cheapen her image with the general public" because of her support for the Panthers. It gave her the documents that proved this.

Mr. Gary, who had remained close to Miss Seberg after their divorce in 1970, said in a press conference after her death that his wife had become psychotic after the stillbirth of her daughter and that she had tried to kill herself on each anniversary of the baby's birth.

"I give you my word of honor," he said, "that before that, she never had a single breakdown. She wasn't drinking either. She was neurotic.But after that, she became paranoid." He maintained that he was the child's father.

A member of the Gary family said yesterday that the writer was still brooding about Miss Seberg's death a few weeks ago. "He was very anxious and when I asked him why, he said he would never forget how his ex-wife's reputation had been dirtied," the relative said.

Mr. Gary's relationship with Miss Seberg has tended to overshadow in recent years the substantial successes of his professional life. That relationship reportedly included an incident in which he challenged actor Clint Eastwood to fight a duel because, it was said, Miss Seberg and Eastwood were having an affair while making a movie.

But Mr. Gary will be remembered as the author of "Les Racines du Ciel" ("The Roots of Heaven"), a novel about the wanton slaughter of elephants in Africa and the organization of a group of commandos to fight the hunters. The book won the prestigious Prix Goncourt in 1956 and has been described by critics as a flawed masterpiece, an allegory about freedom that compares with "Moby Dick."

"I was quite ill after the war," Mr. Gary once said, "unable to walk the earth for fear of treading on an ant . . . and then I wrote "The Roots of Heaven, urging human beings to take the protection of nature into their own hands."

He also will be remembered for his first novel, "Education Europeene," published in English under the title "Forest of Anger." It is a series of vignettes about two youngsters in Poland who manage to love each other despite their exposure to the brutalities of the Nazi occupation of their country during World War II. It won the Prix des Critiques.

In all, Mr. Gary wrote more than 20 books. They include "Le Couleurs du jour" ("The Colors of the Day"), a farce about Nice at carnival time that was widely praised by critics, and "The Dance of Genghis Cohn," a novel about the ghost of a Jewish music hall performer who takes possession of the soul of the SS officer who has murdered him. Andre Malraux, an author and former minister of culture in France, called this work "one of the rare contributions of our time, both to mythology and to great comic literature."

In 1967, Mr. Gary directed Miss Seberg in a film, "Les Oiseaux Vont Mourir au Perou" ("The Birds Are Going to Die in Peru"), which was based on still another of his novels. In 1972, he directed James Mason in "Kill."

In fact, many of Mr. Gary's books were made into movies. The books were more successful than the films, both critically and financially, and Mr. Gary once said about this situation that "I don't suffer as an author when I see such movies. I suffer as a moviegoer. I am an inveterate fan."

The experience Mr. Gary brought to his books and films was as rich and varied as anything he wrote about. He was born in Tiflis, the capital of Russian Georgia, on May 8, 1914, or, according to other accounts, in Vilna, Lithuania. His mother, who raised him, was Mina Josel Kacew, a Jewish music hall performer who was twice married and twice divorced. She had a successful hat shop in Vilna at one time. When this business failed, she moved to Nice, France, where she told fortunes and gave beauty treatments.

Always ambitious for her brilliant son, she made sure that he was able to attend the universities at Aix-en-Provence, at Warsaw, where he studied Slavic languages, and at Paris, where he took a law degree. The young Gary was the table tennis champion of Nice in the early 1930s and among the jobs he had were as an instructor of fencing and of riding.

World War II introduced him to real danger -- and tragedy and heroism. He was a pilot in the French air force. He was imprisoned after the fall of France, escaped to England, flew with the Royal Air Force and later with the Free French. He was wounded three times. His decorations included the Croix de Guerre, the Legion of Honor and the Order of the Liberation.

(He later wrote what was described as an "imaginative" autobiographical work, "La Promesse de l'aude" ("Promise at Dawn"), in which he paid tribute to his mother. It is said she feared that she would die during the war and that to reassure him she wrote 200 letters, each to be mailed at an interval whether she lived or died. In fact, she survived. A critic said that in the book Mrs. Kacew "comes brilliantly to life as a fusion of lunatic romanticism and indomitable resourcefulness.")

Mr. Gary began his diplomatic career after the war. His posts included Sofia, Bulgaria, Berne, Switzerland, and the United Nations. From 1956 to 1960, he was French consul general in Los Angeles. He then asked the Foreign Ministry to place him on the inactive list so he could pursue his other interests. In 1967 and 1968, he was an official of the French Ministry of Information in Paris.

His first wife was British novelist Leslie Blanch. The marriage ended in divorce.

He met Miss Seberg, who had been selected by Preminger to play Joan of Arc after a search that reportedly included 18,000 candidates, while in California. They began living together and were married in 1963. By all accounts, that relationship became the dominant influence during the rest of his life. Even after their divorce, Mr. Gary cared for her financially and in other ways -- he divided his apartment in Paris so that she could live in part of it in privacy.

One of Mr. Gary's more successful books was "Chien Blanc" ("The White Dog"), published in 1970. In the interview he gave after Miss Segerg's death, he said it was "the story of her crusade. . ."

"I couldn't cope with all that idealism," he said. "I felt, I knew, that she was the prey of deadbeats and crooks. She was being exploited. She gave every penny she had. One day, somebody asked for a few thousand dollars for a truck, supposedly for some black charity. The next day, I saw that man driving a two-seat Alfa-Romeo."