No details about the case could be released as it was classified, the official said.
China says Taiwan has 'no future' diplomatically
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.
"A man named Zhou Hongxu has been detained," Liao Chien-yu, a judge and spokesman for the Taipei District Court, told Reuters. Liao said the named suspect was the same individual being cited in local media reports.
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.
Beijing warns Trump: One China 'not negotiable'
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.
"Our policy is unchanged on mainland Chinese students coming to Taiwan for studies. Mainland Chinese students pursuing studies in Taiwan should respect our laws and their purpose should be to learn," it said.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ