Kurt Waldheim withdrew his name from the deadlocked balloting for the post of secretary general today but his action failed to break the month-long impasse over the top U.N. job.

His chief rival, Tanzanian Foreign Minister Salim A. Salim, remained in the running for the time being for the position that Waldheim has held since 1972.

Waldheim's move is not expected to produce the desired avalanche of fresh contenders for consideration by the 15-nation Security Council because most are believed to be reluctant to come forward as long as Salim remains a candidate.

The secretary general's announcement followed a request by Security Council President Olara Otunnu of Uganda that both current candidates voluntarily step aside for the moment. The Security Council has been unable to reach a decision between the two in the 16 ballots that have been taken.

China has vetoed Waldheim on each of the 16 ballots cast so far, and the United States has similarly blocked Salim.

Waldheim's announcement, which came in a letter to the Security Council, noted the deadlock and said:

"In these circumstances and in order to facilitate the task of the council I would ask that my name not be included in further ballots the council may hold. I am making this request in the greater interest of the organization to which I remain unalterably committed."

The wording of the statement led to widespread speculation that Waldheim's move was a tactical one and that he remains open to continue serving for an unprecedented third term as secretary general should no other acceptable candidate be found. A Waldheim aide confirmed, on instructions, that the 62-year-old former Austrian foreign minister "remains open to any reasonable proposition from the council."

The question of withdrawing Salim's name from the balloting was discussed tonight at a meeting of the group of African U.N. member states, The Associated Press reported. After the meeting, Oumarou Youssoufou, U.N. observer of the 51-nation Organization of African Unity, announced: "Mr. Salim is our candidate."

Salim also reaffirmed that he remained a candidate, but would not say whether at some point he might remove himself from the balloting, at least temporarily, for the consideration of other candidates.

Some African diplomats suggested that Salim might remain a candidate for at least one more series of ballots to judge the impact of Waldheim's withdrawal.

Most diplomats said Salim's position appeared to be untenable, however, and said they felt that he too would have to step aside for other candidates by next week.

Many diplomats believe the council will be unable to agree on any of the new candidates, should they come forward, and Waldheim will end up with a two-year extension of his present term when time runs short. Waldheim's second five-year term expires Dec. 31.

But all recognized the possibility that Waldheim's calculated sidestep might backfire, if one of the new candidates can muster the required majority of nine votes and avert a veto by the five big powers -- Britain, China, France, the Soviet Union and the United States.

No more voting is expected until late next week, after the new candidates are given time to step forward and the council members get voting instructions from home. The men considered the most likely new candidates are:

Mexican Foreign Minister Jorge Castaneda; Panamanian Foreign Minister Jorge Illueca; Carlos Ortiz de Rosas of Argentina; Javier Perez de Quellar of Peru; Shridath Ramphal of Guyana, the secretary general of the Commonwealth; Sadruddin Aga Khan, former U.N. High Commissioner for Refugees, and Rafael Salas of the Philippines, chief of the United Nations population fund.

But diplomats said the Soviet Union has been dropping broad hints that for the time being it would support none of those and might veto them all -- apparently in hopes of extending the deadlock and forcing agreement on Waldheim.

Otunnu told reporters he had asked Salim and Waldheim to step down after he had consulted both China and the United States. He said he told each candidate that the Chinese position remains "categorical" while there was "no sign of change" from Washington.

China's official New China News Agency said today that "under no circumstances will China's position of support for the Third World's candidate change. China has no personal prejudice against Waldheim but it does not tolerate the control and manipulation of U.N. affairs by one or two superpowers."

The statement also accused the United States of playing into Soviet hands by vetoing Salim, who, it is widely believed, is also unacceptable to Moscow.