When a Taiwanese diplomat secretly organized a Washington demonstration against visiting Chinese Vice Premier Deng Xiaoping, angry State Department officials called in the diplomat's supervisors for an afternoon chat.

But before the U.S. officials could ask their Taiwanese counterparts to send the offending diplomat home, a call came from the office of a powerful U.S. senator, objecting to this harassment of a friendly nation.

It was one more telling example of potent underground maneuvers on the American scene by an Asian nation with fewer people than California and no official relations with the U.S. government.

With the recent arrest of several Taiwanese intelligence officers in connection with the October murder of Chinese-American author and businessman Henry Liu in California, American officials are concerned once more about espionage by Taipei and the pitfalls of dealing with a country that may act as a U.S. friend and foe simultaneously.

It is an especially ticklish problem for U.S. policy-makers trying to strengthen new ties with the communist Chinese in Peking while not forsaking the anti-communists who have turned Taiwan into a compelling advertisement for free enterprise and democracy in Asia.

The Liu case may be the most serious revelation in some time of Taiwan's meddling in American lives, but U.S. government experts say that there are many earlier examples. Among them:

* In 1974, FBI agents broke up a conspiracy by Taiwanese intelligence agents to obtain U.S.-made submarine torpedoes illegally, using gang members in San Francisco's Chinatown and unscrupulous American businessmen.

* During the Carter administration, one official complained that classified reports circulated at the State Department on a Friday were in the hands of the Taipei government Monday.

* One Taiwanese agent obtained a secret U.S. military contingency plan in 1979 and leaked it to embarrass the State Department, U.S. officials said.

* American scholars say some of the more than 20,000 Taiwanese students on U.S. campuses are spending some time keeping an eye on their fellow students for Taipei.

But the murder of Liu, allegedly in retaliation for his published attacks on Taiwan's leadership, has surprised many American experts who thought that Taipei was moving away from the hard-edged approach it has taken in many underground activities in the United States.

When Gen. Wang Sheng, a principal exponent of harsh treatment of dissidents, was transferred last year from a key military post in Taipei to be ambassador to Paraguay, many interpreted this as a signal from President Chiang Ching-kuo that a new approach was in order. Chiang was bothered by suggestions that Wang might succeed him, American and Taiwanese officials said. He also partially blamed Wang's disciples for the mysterious 1981 death of Chinese-American professor Cheng Wen-chen, which caused an uproar in the U.S. Congress.

The murder of Liu, said a former U.S. intelligence officer, "shows that not everybody got the word" after Wang's transfer.

American news services have reported, however, not only the arrest of some military intelligence officers but the dismissal, detention and interrogation of Adm. Wang Hsi-ling, a key figure in past Taiwanese espionage efforts in the United States. The unusually swift and public admission of official wrongdoing in the Liu case suggests a concerted effort by Chiang's government to stress its new policy and prevent further harsh reaction from the U.S. government.

As a sign of distress in the growing and politically potent Asian-American community, Rep. Norman Y. Mineta (D-Calif.) has written Attorney General William French Smith to protest the "apparent lack of interest and activity by the Justice Department in pursuing the killers of Henry Liu."

"Given this administration's vociferous claim to be serious about stamping out terrorism, your silence is inexplicable," Mineta said. "I am sorry to report that there is a growing feeling among Americans of Asian ancestry that this administration is not seriously concerned with the most basic rights of minority citizens."

A detective from Daly City, Calif., where Liu was killed, and at least one FBI agent were sent to Taiwan to interview two Taiwan-based gang members said to have particpated in the murder. Several members of Congress and the Committee to Obtain Justice for Henry Liu, organized by the victim's friends and family, have demanded the suspects be extradited for trial in the United States. But Taiwan and the United States have never had an extradition treaty.

If Chiang's government pursues a case against the men it has in custody, their punishment may be much swifter and surer. Taiwan is not enamored of many American-style guarantees of due process, such as those that allowed the release for insufficient evidence of David Yu, a Taiwanese immigrant arrested in San Gabriel, Calif., for his alleged role in Liu's murder.

Whether Congress or President Reagan will be willing to threaten a cutoff of vital U.S. arms sales to Taiwan to force extradition of Liu's alleged killers remains to be seen, U.S. experts said.

As one Taiwanese journalist here said, "some if not all of our intelligence people have good connections with the underworld figures" in many Chinese-American communities. Those connections are expected to continue, and even the semi-official Taiwanese presence in the United States thrives.

At last count, the Coordination Council for North American Affairs, the official name of Taiwan's unofficial diplomatic offices in the United States, had branches in Atlanta, Boston, Chicago, Honolulu, Houston, Los Angeles, New York, San Francisco, Seattle and Bethesda and is scheduled to open one in Kansas City.

This is far more U.S. offices than are maintained by mainland China's government, which is officially recognized by this country.