No details about the case could be released as it was classified, the official said.
China has never renounced the use of force to take back Taiwan, an island it regards as a wayward province. Chinese spy cases in Taiwan usually involve retired Taiwanese military officers.
Taiwan media identified the man as 29-year-old Zhou Hongxu from China’s Liaoning Province, citing his Facebook account.
Reuters could not verify the authenticity of the Facebook account, which included a growing number of comments being left by visitors accusing Zhou of being a Chinese spy.
Prosecutors asked that Zhou be taken into custody on suspicion of violating national security laws and the request was approved by the court, Liao said, adding that Zhou could be held for at least two months.
China cut off official communication channels with Taiwan since President Tsai Ing-wen took office last year to pressure her to concede that the island is a part of China. Her Democratic Progressive Party traditionally favors independence.
Taiwan’s Education Ministry said it was looking into the case. The Mainland Affairs Council, which decides policy toward China, said the island would continue to welcome exchange students from China.
Chief Secretary of Taiwan’s National Chengchi University Wang Wen-Chieh also said the university has not changed its policies toward Chinese exchange students as a result of this case.