Norodom Sihanouk, Cambodia's former head of state and a virtual prisoner the last three years, arrived here from Phnom Penh tonight on his way to argue his belegaguered country's case at the United Nations.

It was the first time the prince, who brought independence to Cambodia and became its national hero, has been allowed to leave Cambodia since 1976. After Sihanouk lent his international prestige to the Communists as figurehead of their government-in-exile, he was "retired" in 1976, clearly unacceptable even as a nominal head of state to the radical regime.

The still robust-looking man, now completely gray, shook hands vigorously with Vice Premier Teng Hsiaoping and other Chinese leaders who greeted him at Peking's airport.

His arrival here showed how desperate the Phnom Penh government is to rally world opinion against the Vietnamese and Vietnamese backed insurgents who are marching closer to Phnom Penh.

It was also viewed as a concession to China, the Phnom Penh government's principal ally, which developed close ties to Sihanouk during the prince's six-year stay in Peking.

Accompanying Sihanouk were his wife Monique and Penn Nouth, deputy to the prince for most of his political life, and the wife of Penn Nouth. This was seen as a sign of some confidence on the part of Phnom Penh since there were no hostages left, as it were, to ensure Sihanouk's return to Cambodia.

An American television crew trying to film Sihanouk was pushed away, and he said nothing to the few journalists waiting at the airport. The official New China News Agency said he would have a "short stay" in a guest house here before coninuing on to New York.

While in power, Sihanouk was a warm and engaging man well known to several American journalists and officials. His utter seclusion in the last three years gave rise to rumors that a stroke had rendered him speechless.

The Chinese news agency said, however, that he was "leading a senior government delegation... to attend a session of the U.N. Security Council at which to present charges against Vietnam for its invasion of Democratic Kampuchea," or Cambodia.

Diplomatic sources here said that diplomats in the Cambodian capital had been advised to leave the city and that there were indications today that the civilian population was moving out as Hanoi-backed insurgents appear to be in centrol of the eastern third of Cambodia.

Teng, in an interview with American journalists yesterday, called for U.N. intervention on behalf of Cambodia, but acknowledged that the Phnom Penh government could not expect anything more than moral support. When asked if China would send more arms and military advisers to help the Cambodians, Teng said China had been sending material but did not need to send advisers because the Cambodians had good experience from their fight against the former American-backed government in Phnom Penh.

Peking has, however, reportedly moved major military forces toward its southern border with Vietnam. China sees Vietnam as the agent for its archfoe, the Soviet Union, and the two former Assian allies have had a number of violent border incidents in recent weeks.

Today, the New China News Agency revived a slogan missing from its dispatches in recent weeks -- "Hanoi is preparing for war against China." Recent visitors to Vietnam have reported active military prepartions on the Vietnamese side of the border. Sources in Washington now say China has increased the number of troops, ammunition, Mig 19 jets and IL28 bombers of its own in the area.

A foreign diplomat recently returned from the border province of Yunnan quoted Chinese farmers as saying the army had built more roads in the area in the last six months than in the past 20 years. One foreign resident who had permission to visit the island of Hainan, where Peking maintains a major naval fleet, was told the trip was off for the time being.

Sihanouk lived here from the time he was deposed in 1970 until the Cambodian Communists won power in 1975. He was the figurehead leader of the government-in-exile that was recognized by the Chinese during the five-year war against the U.S.-backed government of Lon Nol.

After his return to Cambodia in 1975, Sihanouk was declared head of state, but there was no real place for him in the new radical, xenophobic leadership. Cambodia soon became an international pariah as reports of coldblooded killing of hundreds of thousands of noncommunist Cambodians came from refugees fleeing the country.

At the same time, Cambodia's ancient border feud with Vietnam resumed, with atrocities reported on both sides. Cambodia's ties to China, and Vietnam's to the Soviet Union, aggravated the split.

A year ago, Hanoi launched an offensive that the Cambodians appeared to blunt successfully. The Vietnamese tried a few more thrusts, using many modern American weapons left by the defunct pro-American Republic of Vietnam but they did not appear to make much headway until they organized an insurgent front led by Cambodians friendly to Hanoi. The front promised to end atrocities. Hanoi moved better equipment and soldiers to the Cambodian front, and a much more successful invasion began Dec. 25.

"They unleashed a large-scale war of aggression against Kampuchea at the New Year's Eve, hoping to seize Kampuchea's land and wealth as a New Year's gift. The Vietnamese authorities must not cheer too soon, because they have debts to repay with interest," an officials commentary in China's official People's Daily said today.

Peking has issued a number of warnings to6Vietnam recently about military action that might be taken if Hanoi's attacks on the border area became intense. The Chinese news agency also said yesterday that its Ministry of Foreign Affairs had protested vigorously to the Vietnamese Embassy the continued movement of ethnic Chinese refugees from Vietnam to China.

Last week, Chinese Central Committee member Liao Cheng-chih said Vietnam's border raids had increased and its "truculence has reached an intolerable degree."

Teng said on Jan. 1 that Hanoi and Moscow were "compelling us to take steps we would not be willing to take."

Diplomats here remain uncertain whether these signals are as strong as those that preceded China's attack on India in 1962 or its entry into the Korean war in 1950.

Sihanouk arrived in a Chinese civilian aircraft and was greeted not only by Teng but by Politburo members Keng Piao, specialist in foreign relations, and Chen Mu-hua, specialist in foreign aid. Foreign Minister Huang Hua also greeted Sihanouk.

The Chinese news agency said Teng Ying-chao, also a Politburo member and the widow of Sihanouk's old ally, Premier Chou En-lai, would receive him at the guest house. Diplomatic sources reported that she was not allowed to see Sihanouk when she led an earlier Chinese diplomatic delegation to Phnom Penh.