BONN, West Germany (AP) _ Soviet Foreign Minister Eduard Shevardnadze will visit Bonn this fall, government spokesman Friedhelm Ost said Friday.

Ost announced the trip at a news conference but gave no date or details.

He said the visit reflects improved relations between the Soviet Union and West Germany, the linchpin of the NATO military alliance. Relations had cooled after West Germany began deploying U.S.-built medium-range missiles in 1983.

Shevardnadze will be the highest-ranking Soviet official to visit the West German capital since Soviet leader Mikhail Gorbachev came to power in Moscow in March 1985.

It will be the first trip to Bonn by a Soviet foreign minister since Andrei Gromyko's visit in January 1983.

Gromyko was seeking then to convince the West Germans not to deploy U.S.-built Pershing 2 and cruise nuclear missiles.

West Germany began deploying the missiles late in 1983, despite Soviet pressure. Those and other medium-range missiles in Europe would be dismantled under a proposed U.S.-Soviet accord.

West German President Richard von Weizsaecker travels to the Soviet Union next week in what Ost said was also a sign of ''lasting improvements'' in Soviet-West German relations.

Ost said Weizsaecker, in his talks with Moscow officials, will raise the issue of ethnic Germans in the Soviet Union who want to emigrate to West Germany.

The president is also expected to discuss East-West disarmament efforts and other security and humanitarian issues.

Weizsaecker indicated to reporters this week that he would not make the continued imprisonment of West German pilot Mathias Rust a central issue.

Rust has been in Soviet custody since May 28, when he flew unheralded from Finland and landed a small plane at Red Square.