A disgruntled author threatened to fly a light plane into his New York publisher's office building today in a publicity-seeking protest against the way his autobiography was edited.

As thousands of people evacuated their offices at the United Nations and the publishing firm, Harcourt Brace Jovanovich, Robert Baudin, 61 flew circles over the east side of Manhattan near U.N. headquarters. Those on the ground looked skyward like extras in "Close Encounters of the Third Kind." Baudin, a licensed pilot, held his pattern from slightly more than three hours while a police helicopter tailed him and tried to talk him into landing. His gas tank almost empty, Baudin landed across the East River at La Guardia airport, where he shook hands with a swarm of police who then took him into custody.

"I may get some jail, but it was worth it," said Baudin, who pulled a similar stunt in 1969 in an attempt to save himself some jail time.

While Baudin was aloft in his rented, single-engine Cessna 172, the sky-gazing crowds below were swept by rumors that he intended to smash into the United Nations.

Just as the day's General Assembly session was to begin, its president, Salim A. Salim, and U.N. Secretary General Kurt Waldheim were advised by police that "a lunatic in an airplane is flying around here and threatening to crash the plane into the building," U.N. spokesman Rundolph Stagduhar said in explaining why all 5,000 U.N. employes were evacuated for the first time in the organization's history.

The police dismissed the idea of shooting Baudin down because, as Inspector Milton Schwartz observed, they wouldn't know where he would fall.

"We're treating this like a normal hostage situation," Schwartz said. "The only difference is that he'll run out of gas."

Police Captain Frank Bolz, New York's expert in talking hostage-takers into surrendering, flew in a police helicopter at 800 feet, following Baudin, who stayed at 1,100 feet, and urging him to land safely.

Baudin's autobiography, "Confessions of a Promiscuous Counterfeiter," was published by Harcourt Brace Jovanovich April 16. Stuart Harris, a spokesman for the publisher, said about 6,000 copies have been sold. "I've never laid eyes on him. I don't know anything about him," the firm's head, William Jovanovich, said as he stood on Third Avenue watching his 800 employes evacuate the building.

"I'm sorry to say I haven't read the book either," Jovanovich added.

Baudin claimed in a tape delivered to the New York Post after he was airborne that the editors had chopped up his book and had failed to promote it adequately. He demanded that a second edition be published under a new title within three months. In his tape, he did not mention that the publisher has an option on Baudin's next work but has told him that the 10 pages or so of manuscript and the general outline he submitted do not interest Harcourt Brace.

"Confessions of a Promiscuous Counterfeither" ends with a description of a similar Baudin flight over Sydney, Australia, in 1969. Baudin threatened to crash his plane into the Pacific Ocean off Sydney unless the government there agreed to negotiate his 20-year sentence for counterfeiting. Baudin, born in the United States, was reared in Australia.

The book jacket reproduces a Sydney newspaper headline of the time: "Crazed Pilot Over City!"

Because of surrounding tall buildings, Baudin never got very close to Jovanvich's windows, which he threatened to fly through in his message to the Post.

He wasn't the only man with a cause in the sky, however. The new sex magazine, Harvey's, scrambled to get a plane aloft, trailing an advertising banner to catch the eyes of manhattan's thousands of skywatchers.