The Immigration and Naturalization Service issued an order yesterday seeking to prevent the departure from the United States of the 16-year-old son of a prominent Soviet diplomat after it appeared the youth may be trying to defect to this country.

The INS was acting on behalf of the State Department, which said it wants to interview the youth, Andrei V. Berezhkov, who lives with his parents in a high-rise apartment building in Friendship Heights. The teen-ager's parents reported that he disappeared from the family home for about 24 hours Wednesday and Thursday, during which time two letters, signed with his name, were received by the White House and The New York Times. The letter to the newspaper said, "I hate my country and it's sic rules and I love your country." The White House would not reveal the contents of the letter it received.

The youth is the son of Valentin M. Berezhkov, a first secretary in the Soviet Embassy here, who, for a Soviet diplomat, holds a prominent and unusual place on the Washington diplomatic scene. As the Washington representative of what is, in effect, a Soviet think tank on American affairs, the elder Berezhkov was described yesterday by friends as an urbane, sophisticated expert on America who served as a tour guide for high-level Soviet visitors and was welcomed into the homes of many American journalists and professors. The elder Berezhkov is the representative in Washington of the USA and Canada Institute, the Soviet research and consulting center on North American affairs.

State Department officials said the youth was visiting his family during the summer school recess. Although the youth previously lived here, he had returned to the Soviet Union for education, as do most teen-aged children of diplomats.

Events escalated into a potentially nasty diplomatic incident yesterday. FBI agents and other federal authorities stood guard at the Soviet Embassy's compound on Tunlaw Road in Northwest Washington, where most embassy personnel live, and outside the Soviet Embassy downtown on 16th Street NW.

As cars filled with embassy personnel entered and left the iron gate that guards the compound at the end of the work day yesterday, plainclothes and uniformed agents peered inside.

One of the agents said they were looking for the youth or his father.

"It is almost a siege of the compound," one embassy official contended.

He asserted that the attempt by U.S. authorities to prevent the youth's departure is "unprecedented and an express violation of international law." He said the State Department's insistence on interviewing the youth is "absolutely unacceptable."

At one point late yesterday there were 15 FBI agents taking turns peering into vehicles at the compound's gate, and as it grew dark, they used flashlights to see into the vehicles. About 7:30 p.m., a car with a couple of the FBI agents followed a van that left the compound.

Occasionally, occupants of the Soviet vehicles smiled and exchanged greetings with the federal agents. Others drove by expressionless.

The youth's whereabouts could not be determined yesterday. There was no answer at the family's three-bedroom apartment on the fifth floor of Highland House West, a 16-story apartment building at 4450 S. Park Ave. in Friendship Heights, just across the District line in Montgomery County.

Resident manager M.G. Raphel said the Berezhkovs have lived there "a long time" and gave no indications they were planning to move. He said many of the building's 300 units are rented to diplomats (although most Soviet officials live in Soviet-owned buildings).

"Whatever happens, it will be a personal tragedy for Mr. Berezhkov," said one friend, Dimitri Simes, senior associate at the Carnegie Endowment for International Peace. "His career is ruined. . . . He obviously will be sent back home and will not be able to travel again . . . and if his son is sent back to the Soviet Union, this incident will have serious implications for the son's whole life."

The incident began three days ago when the Soviet Embassy reported to the State Department that the youth had taken his family's car and was missing, according to a State Department spokesman. "The parents were not aware he could drive and were disturbed when he disappeared with the car," spokesman John Hughes said.

At that point, the State Department treated the event as nothing more than a child running away from home and considered it a "police matter," according to Hughes.

The State Department notified Montgomery County police of the youth's disappearance, and Montgomery officers interviewed the elder Berezhkov at his apartment, according to police spokesman Cpl. Philip Caswell. They issued "a lookout for the car" and the youth, "followed some leads in the area," and then, in a routine procedure, sent a teletype message to police on the East Coast to look out for the youth, Caswell said. Police received word about 8:30 a.m. Thursday from the State Department that the youth had returned home, Caswell said, adding, "That was about it as far as we were concerned."

Hughes said the State Department was told by the Soviet Embassy that the youth had returned home about 2 a.m. Thursday. Hughes would not say when the State Department learned of the two letters, but said, "Then things took on a different character."

Hughes said that by Thursday night the incident had reached large enough proportions to involve Secretary of State George Shultz, although Hughes would not elaborate on the secretary's role.

The State Department and the embassy exchanged diplomatic notes, and the department was "insisting" yesterday that the youth be interviewed "to ascertain his intentions" before departing the country. That, Hughes said, "is consistent with U.S. law."

A Soviet Embassy spokesman said yesterday that the letter signed with the youth's name and received by The New York Times "looks like a forgery" because it contains "so many American cliches." The official referred to a comment in the letter that said if the youth's parents learned what he was doing, "they'll put me in Siberia."

The letter said, "I want to stay here. I wrote to Mr. President." It also said the writer was driving to New York to "the U.S. mission," apparently referring to the U.S. Mission to the United Nations. A spokesman there said yesterday that the youth had not been seen there.

An INS spokesman said that, at the State Department's request, it had issued an order to all domestic and foreign airlines with flights leaving the United States "that they may not board" the Berezhkov youth.

Since the imposition of martial law in Poland in December 1981, regular flights of the Soviet airline Aeroflot to the United States have been suspended. But some special flights have been authorized. Officials said Soviet citizens generally travel by train or commercial airlines to Montreal to board Aeroflot flights there.

The INS spokesman said such orders are rare, but that one had been used in the case of Walter Polovchak, a Ukrainian youth who became the focus of an international custody battle in 1980 when he asked for asylum in the U.S.