By Katy Stech Ferek, Kate Davidson and Georgia Wells

WASHINGTON -- Microsoft Corp. is in talks to acquire the U.S. operations of TikTok, the Chinese-owned video app, according to people familiar with the matter, as President Trump said on Friday that he was considering taking steps that would effectively ban the app from the U.S.

A sale to Microsoft, likely for billions of dollars, would be a win for both TikTok and Bytedance, where executives had feared that the U.S. government would force device makers to take TikTok out of their app stores, according to another person familiar with the matter.

News of the talks, earlier reported by Fox Business, came as the U.S. was concluding a security review that was expected to recommend a divestiture of TikTok by its Chinese owner, Beijing-based Bytedance Ltd.

"We're looking at TikTok. We may be banning TikTok," Mr. Trump told reporters as he prepared to leave on a trip to Florida. "We may be doing some other things, there are a couple of options. But a lot of things are happening. So we'll see what happens. We are looking at a lot of alternatives with respect to TikTok."

Microsoft didn't immediately return calls for comment.

U.S. officials have expressed concerns that TikTok could pass on the data it collects from Americans streaming videos to China's authoritarian government. TikTok has said it would never do so.

In a statement posted online this week, TikTok CEO Kevin Mayer, who was hired away from Walt Disney Co. earlier this year, said the company was committed to transparency.

"TikTok has become the latest target, but we are not the enemy," he said.

A person familiar with the matter said earlier that U.S. officials had ordered Bytedance to divest its ownership.

The app known for its catchy dancing and lip-syncing videos has soared in popularity this year amid the pandemic. About 315 million users downloaded TikTok in the first quarter of the year, the most downloads ever for an app in a single quarter, according to research firm Sensor Tower, bringing its total to more than 2.2 billion world-wide.

In addition to concerns that TikTok could collect data on Americans, U.S. officials have been concerned that the app could be used to spread Chinese propaganda and that the platform's moderators could be censoring content to appease Beijing.

The review of TikTok has centered around ByteDance's 2017 acquisition of a similar video-sharing platform called Musical.ly, a Shanghai-based platform that had built a strong U.S. user base. After the acquisition, Musical.ly's platform was discontinued, and users who wanted to share videos could continue to do so on TikTok's platform.

ByteDance, whose secondary shares have valued the firm at $150 billion in recent weeks, counts big-name U.S. investors such as Coatue Management and Sequoia Capital among its backers.

The Committee on Foreign Investment in the U.S. began its probe into TikTok last year, amid concerns from members of Congress and others about the data it might be collecting.

At the time, Sen. Chuck Schumer (D., N.Y.) called the investigation "welcome news."

"This new investigation is validation of our concern that apps like TikTok -- that store massive amounts of personal data accessible to foreign governments -- may pose serious risks to millions of Americans and deserve greater scrutiny," Mr. Schumer said.

The investigation into TikTok is taking place as the national security review panel has increasingly focused on deals that put U.S. citizens and their privacy at risk, a focus that Congress ordered in a 2018 law.

Under the new law, regulators will investigate deals involving foreign money if that business has access to data on more than one million people, including certain genetic and biometric data, financial data and health data. The rules also apply to investments in U.S. businesses that track users' locations or target U.S. military or national security personnel.

The Treasury-led Committee on Foreign Investment in the U.S., or Cfius, is a panel of federal agencies that reviews deals involving foreign money to ensure they don't put the country's national security at risk. The panel has the power to review deals that involve U.S. companies, such as the 2017 acquisition.

Earlier this year, Mr. Trump ordered another Chinese company to sell its stake in a Maryland property management software firm, a platform that hotels and casinos use to enable guests to check into rooms using smartphones. That order marked the sixth time a U.S. president has either blocked a deal or ordered a corporate selloff since Congress authorized the power to intervene in 1988.

At a congressional hearing on Big Tech's market power this week, Facebook Inc. Chief Executive Mark Zuckerberg made it clear that he intends to address threats from China -- a not-so-veiled reference to TikTok's rise.

Mr. Mayer, TikTok's CEO, fired back in a blog post Wednesday morning, disparaging Facebook's "copycat" efforts to match TikTok and saying many attacks on the company are "disguised as patriotism."

Alex Leary contributed to this article.

Write to Katy Stech Ferek at katherine.stech@wsj.com, Kate Davidson at kate.davidson@wsj.com and Georgia Wells at Georgia.Wells@wsj.com