TikTok and WeChat will be banned from US app stores from Sunday, unless President Donald Trump agrees to a last-minute deal.
The Department of Commerce said it would bar people in the US from downloading the messaging and video-sharing apps through any app store on any platform.
The Trump administration says the companies threaten national security and could pass user data to China.
But China and both companies deny this.
WeChat will effectively shut down in the US on Sunday, but people will still be able to use TikTok until 12 November, when it could also be fully banned.
TikTok said it was "disappointed" in the order and disagreed with the commerce department, saying it had already committed to "unprecedented levels of additional transparency" in light of the Trump administration's concerns.
"We will continue to challenge the unjust executive order, which was enacted without due process and threatens to deprive the American people and small businesses across the US of a significant platform for both a voice and livelihoods."
The ban order from the Department of Commerce follows President Trump's executive orders signed in August. It gave US businesses 45 days to stop working with either Chinese company.
If a planned partnership between US tech firm Oracle and TikTok owner ByteDance is agreed and approved by President Trump, the app will not be banned.
What does the order say?
"At the president's direction, we have taken significant action to combat China's malicious collection of American citizens' personal data," the US Department of Commerce Secretary Wilbur Ross said in a statement.
The department acknowledged that the threats posed by WeChat and TikTok were not identical but said that each collected "vast swathes of data from users, including network activity, location data, and browsing and search histories".
The order means that from Sunday, people will not be able to use WeChat to transfer funds or process payments to or from people in the US.
But TikTok users will still be able to use their app virtually as normal, although they will not be able to download new updates.
"The President has provided until November 12 for the national security concerns posed by TikTok to be resolved," the commerce department said. After this point, some technical transactions will be banned on the app and functionality will be affected.
Asked about the order on Fox Business Network, Mr Ross said that "the basic TikTok will stay intact until November 12", but added that WeChat "for all practical purposes... will be shut down in the US, but only in the US, as of midnight Monday".
This is now all about President Trump.
TikTok's owner, Bytedance, now has to try to find a more palatable deal - and this may be tough. It's been reported that China would rather TikTok be closed down than be forced to sell to the US.
What's not clear though is what Trump's motives are. Sure he wants to flex his muscle against China - and banning a popular app is a very high profile way of doing that - but he also, famously, loves a deal. With 48 hours to go until a potential ban, there is still negotiating time.
Is he trying to give US companies further leverage in any potential merger or acquisition?
In truth, even if a TikTok download ban comes into force, it will still run on peoples' phones. It won't start technically degrading until 12 November.
So there's still plenty of life left in this story.
Why does the US want the apps banned?
The Trump administration has repeatedly said the apps are a threat because of their collection of data.
Friday's statement from the commerce department said the governing Chinese Communist Party "has demonstrated the means and motives to use these apps to threaten the national security, foreign policy, and the economy of the US."
ByteDance has denied that it holds any user data in China, saying it is stored in the US and in Singapore. Tencent, which owns WeChat, has said that messages on its app are private.
While TikTok has millions of users in the US, it is not clear how many of WeChat's billion users are based outside China, although it is likely to be a significant number.
But the US is not the only country concerned about the companies. India has already banned TikTok and WeChat, as well as dozens of other Chinese apps. The government in Delhi said the apps were "prejudicial to sovereignty and integrity of India, defence of India, security of state and public order".
The UK Information Commissioner's Office, a privacy watchdog, is also currently investigating the app.
Hina Shamsi, director of the American Civil Liberties Union's National Security Project said the order violated First Amendment rights.
"The order also harms the privacy and security of millions of existing TikTok and WeChat users in the United States by blocking software updates, which can fix vulnerabilities and make the apps more secure," she said.
What are the apps?
TikTok is a video-sharing app. Users can post up to a minute of video and have access to a vast database of songs and filters.
It collects a huge amount of user data - including what videos people watch and comment on, location data, phone model and even how people type. But much of this data collection is similar to other social networks like Facebook.
In September the company said it had more than 100 million users. It is thought to have more than 800 million members around the world.
WeChat was set up in 2011. It is a multi-purpose app allowing users to send messages, make mobile payments and use local services. It has been described as an "app for everything" in China and has more than one billion monthly users.
Like all Chinese social media platforms, WeChat must censor content the government deems illegal. In March, a report said WeChat was censoring key words about the coronavirus outbreak from as early as 1 January.
But WeChat insists encryption means others cannot "snoop" on your messages, and that content such as text, audio and images are not stored on its servers - and are deleted once all intended recipients have read them.