The Soviet Union will withdraw six military regiments totaling about 6,000 troops from Afghanistan by the end of this year in an attempt to speed the search for a political solution to the war, Soviet leader Mikhail Gorbachev said today.

Gorbachev closed a major foreign policy speech in Vladivostok with the announcement that three Soviet antiaircraft regiments, two motorized rifle regiments, and one armored regiment will return to their permament deployment in the Soviet Union.

Moscow "is striving to speed up political settlement, to give it another impetus," the Soviet leader said, moving the audience of local officials to prolonged applause.

The White House and State Department reacted coolly to Gorbachev's troop withdrawal announcement, saying that "if the Soviets are seriously interested in a settlement, they should present a short withdrawal timetable" at the next round of U.N.-sponsored talks in Geneva. Details on Page A10

Today's announcement appeared to mark the first reduction in Soviet troops since Soviet tanks rolled into Afghanistan in December 1979 to assist the Kabul government in resisting anticommunist rebels. An estimated 115,000 Soviet soldiers are deployed in Afghanistan.

The announcement also comes on the eve of a new round of the U.N.-sponsored indirect negotiations between Afghanistan and Pakistan to end the 6 1/2-year-old war.

The Soviet leader also said he had received President Reagan's letter responding to Moscow's June 11 arms control proposals put forward at U.S.-Soviet negotiations in Geneva, but he offered no assessment of Reagan's reply.

"The reply sets one thinking," Gorbachev said. "We shall treat it with responsibility and attention."

Noting "certain progress" in the Afghan-Pakistani negotiations in Geneva, Gorbachev said that "as soon as a political settlement is finally worked out, the return of all Soviet troops from Afghanistan will be sped up. Schedules for their stage-by-stage return have been agreed upon with the Afghan leadership."

Afghan Foreign Minister Shah Mohammand Dost stopped in Moscow for consultations en route to the Geneva talks, which open Wednesday, and met with Soviet Foreign Minister Eduard Shevardnadze today, the Soviet news agency Tass reported.

Altogether, about 6,000 troops, or 5 percent of the total, will be withdrawn, according to western military analysts in the Soviet capital. The rifle regiments are composed of 2,000 soldiers each, the armored regiment approximately 1,000 and the antiaircraft regiments 300 to 400 each, they said.

Speaking of Reagan's letter, delivered by U.S. Ambassador Arthur A. Hartman on Saturday, one day after Gorbachev left Moscow for the Pacific port of Vladivostok, the Soviet leader continued: "To us, the most important thing is first of all the extent to which the proposals in the letter meet the principles of equal security and whether they make it possible to reach effective joint solutions in the field of ending the arms race and preventing its spreading over to outer space."

The Soviet package put forward last month included a proposal for a 30 percent cut in U.S. and Soviet warheads in exchange for a 15-year extension of the 1972 antiballistic missile treaty.

The Soviet leader said "we favor" a second U.S.-Soviet summit meeting. But he rejected the argument that the only outcome of his first summit with Reagan last November was an agreement for more meetings. He said, "what we signed is the consent to strive for the normalization of relations between the U.S.S.R. and the U.S.A. and for the improvement of the international situation, and to speed up the course of talks on the reduction of armaments. A new summit meeting, too, is called upon to promote that."

Gorbachev also said that Moscow and Mongolia are examining "a question of withdrawing a substantial part of Soviet troops from Mongolia," the landlocked country lying in the Soviet Union's shadow. The Soviet leader did not disclose the number of Soviet troops stationed there, but western estimates range from 35,000 to 75,000.

The withdrawals of limited contingents of Soviet troops from Afghanistan and Mongolia are widely regarded by western diplomats in Moscow as gestures to improve Moscow's image worldwide, particularly in Asia, and to foster improvements in Sino-Soviet relations.

Peking has called for progress in the resolution of military strife in Afghanistan and Cambodia, and a reduction of Soviet troops along the Chinese border, as prerequisites for an improvement in Sino-Soviet relations. The recent thaw in Moscow's ties to Peking threatened to end earlier this summer, and Chinese officials have cited lack of progress in the so-called three obstacles as the reason.

But Gorbachev used his first visit to the Soviet far east to establish Asia and the Pacific Basin as a region of priority in Soviet foreign policy. After a weekend of viewing the Soviet fleet in Vladivostok, and touring the city, which is closed to foreigners, he said today: "The Soviet Union is also an Asian and Pacific country. It realizes the complex problems of this vast region. It is directly contiguous to them."

In his speech, Gorbachev swept across the horizon of Soviet-Asian relations, praising political-economic achievements in China, Vietnam, Japan, India and several other Asian countries, and calling for across-the-board improvements in their ties to Moscow. "The Soviet Union is prepared -- at any time and at any level -- to discuss with China questions of additional measures for creating an atmosphere of good neighborliness," he said.

Gorbachev made a five-point proposal for improving security and Soviet relations in Asia. It included:

Working to bring about an end to regional conflicts;

Blocking the threat of nuclear proliferation in Asia;

Starting talks on the reduction of naval fleets, particularly nuclear ships;

Calling for "radical reductions of armed forces and conventional" armaments deployed in Asia; and

Renewing a proposal for an all-Asia security conference.

The Soviet leader did not offer solutions to political tensions in Vietnam, considered Peking's most pressing interest. Touching on Sino-Vietnamese relations, the Soviet leader said, "We can only express our interest in seeing the border between these socialist states again becoming a border of peace and good neighborly relations."

Citing the recent improvement in Soviet-Japanese relations, highlighted by the exchange of foreign ministers' visits this year, Gorbachev said a Soviet-Japanese summit is "on the agenda."

Underscoring Moscow's interests in Asia and the Pacific, Gorbachev criticized U.S. involvement in the region, including the Vietnam War.

Lauding the development of Asian socialism, Gorbachev said it has also met with "brutal and cynical" counteraction. "Vietnam is the most graphic example," he added.