In a blog post, the ByteDance-owned Short-video making app said that it does not take suing the government lightly.
"However, we feel we have no choice but to take action to protect our rights, and the rights of our community and employees.
"With the Executive Order threatening to bring a ban on our US operations - eliminating the creation of 10,000 American jobs and irreparably harming the millions of Americans who turn to this app for entertainment, connection and legitimate livelihoods that are vital especially during the pandemic - we simply have no choice,"
President Trump filed an executive order on August 6, prohibiting ByteDance from doing any transaction in the US for 45 days.
Trump issued another executive order on August 14, giving ByteDance an option to divest its TikTok business in the US within 90 days.
TikTok has filed the lawsuit against the first executive order.
The White House was yet to react to the TikTok lawsuit.
"The executive order seeks to ban TikTok purportedly because of the speculative possibility that the application could be manipulated by the Chinese government," TikTok said in its lawsuit.
"But, as the U.S. government is well aware, Plaintiffs have taken extraordinary measures to protect the privacy and security of TikTok's U.S. user data, including by having TikTok store such data outside of China (in the United States and Singapore) and by erecting software barriers that help ensure that TikTok stores its U.S. user data separately from the user data of other ByteDance products."
Nearly 100 million Americans turn to TikTok for entertainment, inspiration, and connection and countless creators rely on its platform to express their creativity, reach broad audiences, and generate income.
"More than 1,500 employees across the US pour their hearts into building this platform every day, with 10,000 more jobs planned in California, Texas, New York, Tennessee, Florida, Michigan, Illinois, and Washington State; and many of the country's leading brands are on TikTok to connect with consumers more authentically and directly than they can elsewhere," said the China-based company.
It said that the executive order issued by the Trump administration on August 6has the potential to strip the rights of that community without any evidence to justify such an extreme action, and without any due process.
"We strongly disagree with the Administration's position that TikTok is a national security threat and we have articulated these objections previously".
Microsoft has revealed its intentions to buy TikTok business in the US.
Several other names of tech giants are floating around in the public domain, including Twitter, Oracle and now Alphabet, who may buy the US operations of TikTok.