Liang Wen-chieh, spokesperson for Taiwan's Mainland Affairs Council, told reporters the raised travel warning also applied to the Chinese-run cities of Hong Kong and Macau.
China, which views democratically governed Taiwan as its own territory, has made no secret of its dislike of President Lai Ching-te, whom it views as a "separatist", and staged two days of war games after he took office last month.
Last week, announcing new legal guidelines, China threatened to execute Taiwan independence separatists in extreme cases, a further ramping up of tensions that drew condemnation from Lai and his government, as well as the United States.
Liang, making the announcement at a regular news conference in Taipei, said those guidelines represented a serious threat to the safety of Taiwanese visiting China, in addition to other measures China has been taking to strengthen its national security laws.
"If it is not necessary to go, then don't," he said.
China's Taiwan Affairs Office did not immediately respond to a request for comment.
On Wednesday, asked about concerns the guidelines could cause fear for Taiwan's people and not help improve relations, the office said they were only aimed a very small number of independence "diehards' evil words and actions".