BEIJING — Taiwan has detained two executives of a Hong Kong-based company accused of acting as a front for Chinese intelligence agencies working to undercut democracy in Hong Kong and Taiwan, the official news agency there reported on Tuesday.

Taiwan’s justice ministry ordered the two executives, Xiang Xin and his wife, Kung Ching, to remain in Taiwan while investigators looked into the assertions of a would-be defector in Australia that their company, China Innovation Investment Limited, acted on behalf of Chinese intelligence.

The defector, Wang Liqiang, said he worked for the company and took part in — or knew of — covert intelligence operations that included buying media coverage, creating thousands of social media accounts to attack Taiwan’s governing party and funneling donations to favored candidates of the opposition party, the Kuomintang.

Mr. Wang, 26, detailed his accusations in a 17-page appeal for asylum in Australia, where his wife and child had previously moved to study. While some analysts have raised doubts about Mr. Wang — who the Chinese say was convicted of fraud — two people briefed on his appeal in Australia said his claims were considered serious and reliable enough to warrant a deeper investigation.