Mikhail S. Gorbachev flew to the Central Asian city of Tashkent Wednesday for a meeting with Afghan leader Najib, the official Tass news agency reported.

The meeting in the Uzbek capital apparently was arranged to work out the terms of a Soviet withdrawal from Afghanistan, where Soviet troops have been helping Afghan soldiers battle Moslem insurgents since 1979.Security concerns would prohibit Gorbachev from traveling to Kabul, the Afghan capital, which is sporadically shelled by the guerrillas.

Tass said Gorbachev, the Soviet Communist party general secretary, went to Tashkent from Moscow. Najib, the Afghan head of state, and Soviet Foreign Minister Eduard A. Shevardnadze arrived in Tashkent from Kabul.

Shevardnadze had been in Kabul for four days of discussions.

Tass did not say when Gorbachev and Najib would meet.

U.N.-mediated Afghan peace talks in Geneva have been stalled by a disagreement between negotiators for Afghanistan and Pakistan, which represents the insurgents at the talks, over foreign aid to the warring sides.