The Soviet Union today sharply protested Washington's demand for a 40 percent reduction in Soviet personnel at U.N. headquarters, warning that such actions "do direct damage" to U.S.-Soviet relations and hamper preparations for the summit meeting planned later this year between the U.S. and Soviet leaders.

A senior Soviet official delivered the protest orally in a half-hour meeting at the Foreign Ministry with Richard Combs, charge d'affaires of the U.S. Embassy here.

The Soviet Union called the U.S. demand "arbitrary," "defiant," "unlawful" and "utterly illegitimate," according to a text of the protest released by the official news agency Tass after the meeting.

"The U.S. administration must appreciate that such actions strengthen mistrust of its policies and by no means create a favorable background for the summit," the statement said. Full responsibility for its consequences, it said, "will rest entirely with the U.S. side."

The Soviet Union "cannot pass such unlawful actions over," the statement said, "and will have to draw appropriate conclusions for itself."

Combs responded by reiterating the U.S. position that the current high number of Soviet staffers at the United Nations poses a threat to U.S. security.

Last Friday the United States ordered Moscow to cut its U.N. staff from 275 to 170. Reagan administration officials have long complained about the large number of Soviet officials at the United Nations and elsewhere in the United States. In addition to its U.N. staffers, the Soviet Union has about 320 staffers at its Washington embassy and San Francisco consulate.

By comparison, the United States has about 200 diplomats and staffers in its embassy here and about 40 in its consulate in Leningrad.

"Nothing . . . gives the U.S. government a right to impose numerical restrictions on the staff levels" of U.N. member nations, the Tass statement said.

Comparisons between U.S. and Soviet U.N. staffs are "utterly illegitimate," the Soviet protest said. The State Department and private firms ensure "the functioning of the U.S. mission," it said, "whereas the Soviet mission provides everything it needs on its own."

Moscow said it rejects "as utterly far-fetched and unfounded," the assertions that the Soviet U.N. staff "engage in activities which have no bearing on U.N. work."

Soviet officials reportedly view the order to cut their U.N staff as part of a series of recent Reagan administration actions they consider hostile. President Reagan's response last month to Soviet leader Mikhail Gorbachev's Jan. 15 proposal for worldwide nuclear disarmament drew criticism here, including from Gorbachev in a speech Feb. 25.

Tass said today that the order to reduce Soviet U.N. staffing "reflects the U.S. overall approach to the activities of international organizations." It accused the United States of several other actions against the United Nations and related bodies, including "hostile statements" against the United Nations, "blackmail" against UNESCO "and the creation of an atmosphere of intimidation and terror" around various U.N. missions.

Meanwhile, the Soviet newspaper Pravda today indicated that Vitaly Yurchenko, the Soviet defector who returned to Moscow from the United States late last year, was preparing his memoirs.

Last week National Public Radio quoted an unidentified Reagan administration source as saying that he had received two unverified reports that Soviet authorities had executed Yurchenko by firing squad and billed his family for the bullets -- reports that the State Department and the White House said they could not confirm.

While in the custody of the CIA last year for three months, Yurchenko was "jeered," Pravda said. "And now he's going to tell all about it in his memoirs," which are being prepared for publishing, it said.