Mayer joined TikTok in June after leaving his position as head of streaming services for Disney. Recently, however, TikTok was given 90 days to either be sold to a U.S. company or face its ban in the country.
"In recent weeks, as the political environment has changed dramatically, I have made a significant reflection on what the corporate structural changes will require and what they mean for the global role I signed up for," Mayer said in a letter to the TikTok employees.
"In this context, and as we hope to reach a resolution very soon, I want to let you know with great regret that I have decided to leave the company," he added.
Arguing that TikTok is a "threat" to the U.S. national security, Trump prevented the Chinese company from conducting transactions as of September 15.
With over 80 million users in the United States, TikTOk is one of the social networks that has grown the most in recent years and has become the main entertainment for many teenagers.
China's Foreign Affairs Ministry rejected the forced sale of TikTok and stressed that the U.S. decision violates the principles of the World Trade Organization (WTO).
The war that the Republican president has unleashed against TikTok, Huawei, and WeChat is framed in the U.S. attempt to contain the power of Chinese multinational companies.
"When the U.S. tightened restrictions on Huawei’s access to semiconductor chips last week, the Trump administration’s goal became clear, if it wasn’t already: kneecap the Chinese telecom giant’s technological advancement," World Politics Review recalled.