By Georgia Wells, Jeff Horwitz and Aruna Viswanatha

When Facebook Inc. Chief Executive Mark Zuckerberg delivered a speech about freedom of expression in Washington, D.C., last fall, there was also another agenda: to raise the alarm about the threat from Chinese tech companies and, more specifically, the popular video-sharing app TikTok.

Tucked into the speech was a line pointing to Facebook's rising rival: Mr. Zuckerberg told Georgetown students that TikTok doesn't share Facebook's commitment to freedom of expression, and represents a risk to American values and technological supremacy.

That was a message Mr. Zuckerberg hammered behind the scenes in meetings with officials and lawmakers during the October trip and a separate visit to Washington weeks earlier, according to people familiar with the matter.

In a private dinner at the White House in late October, Mr. Zuckerberg made the case to President Trump that the rise of Chinese internet companies threatens American business, and should be a bigger concern than reining in Facebook, some of the people said.

Mr. Zuckerberg discussed TikTok specifically in meetings with several senators, according to people familiar with the meetings. In late October, Sen. Tom Cotton (R., Ark.) -- who met with Mr. Zuckerberg in September -- and Sen. Chuck Schumer (D., N.Y.) wrote a letter to intelligence officials demanding an inquiry into TikTok. The government began a national-security review of the company soon after, and by the spring, Mr. Trump began threatening to ban the app entirely. This month he signed an executive order demanding that TikTok's Chinese owner, ByteDance Ltd., divest itself of its U.S. operations.

Few tech companies have as much to gain as Facebook from TikTok's travails, and the social-media giant has taken an active role in raising concerns about the popular app and its Chinese owners.

In addition to Mr. Zuckerberg's personal outreach and public statements about Chinese competition, Facebook has established an advocacy group, called American Edge, that has begun running ads extolling U.S. tech companies for their contributions to American economic might, national security and cultural influence. And Facebook overall in the first half of this year spent more on lobbying than any single company, according to data from the Center for Responsive Politics. In 2018, by contrast, it ranked eighth among companies, the center's data show.

It couldn't be determined exactly what role Mr. Zuckerberg's comments have played in the government's handling of TikTok. A spokeswoman for Sen. Cotton said his office doesn't comment on the senator's meetings.

Asked about the dinner, a White House spokesman said the administration "is committed to protecting the American people from all cyber related threats to critical infrastructure, public health and safety, and our economic and national security."

Facebook spokesman Andy Stone said Mr. Zuckerberg has no recollection of discussing TikTok at the dinner.

The CEO's comments in Washington about the Chinese app were tied into Facebook's campaign to blunt antitrust and regulatory threats by emphasizing Facebook's importance to U.S. tech pre-eminence, he said.

"Our view on China has been clear: we must compete," Mr. Stone said in a written statement. "As Chinese companies and influence have been growing so has the risk of a global internet based on their values, as opposed to ours."

In an employee meeting this month, Mr. Zuckerberg called the executive order against TikTok unwelcome, because the global harm of such a move could outweigh any short-term gain to Facebook. The remarks were earlier reported by BuzzFeed News.

TikTok has gained more than 100 million U.S. users and become the biggest threat to Facebook's dominance of social media, as the app's blend of dance videos and goofs has made it a sensation among young people around the world. In the first quarter of 2020, TikTok became the most downloaded app in a single quarter, according to research firm Sensor Tower. Facebook, by comparison, had 256 million monthly users in the U.S. and Canada as of the end of June.

"TikTok has gone from being next-to-nothing to quite something in major Western markets in the last two years," said Brian Wieser, global president of business intelligence at GroupM, a unit of WPP PLC.

While Facebook once acquired startups such as TikTok that it viewed as potential threats, scrutiny from antitrust authorities makes those deals more fraught for big tech companies, so they might look to other defensive measures instead, Mr. Wieser said. "You might then in fact welcome more regulation or things that would limit the opportunities for upstarts," he said.

Facebook's Instagram unit this month launched its own video-sharing feature, called Reels, and is trying to poach TikTok creators by paying some users if they post videos exclusively to the new service.

TikTok's fate is up in the air. With the Trump administration's deadline looming, Microsoft Corp. has said it is negotiating to buy TikTok's U.S. operations, and at least two other groups are believed to be circling, involving Twitter Inc. and Oracle Corp.

It is possible that TikTok ends up with one of those companies, immediately making the buyer a formidable U.S. rival to Facebook.

Facebook's advocacy has angered people inside TikTok, according to people familiar with the matter. Last month, CEO Kevin Mayer publicly accused Facebook of trying to unfairly quash competition.

"At TikTok, we welcome competition," he said in a blog post. "But let's focus our energies on fair and open competition in service of our consumers, rather than maligning attacks by our competitor -- namely Facebook -- disguised as patriotism and designed to put an end to our very presence in the U.S."

Mr. Zuckerberg's arguments about TikTok show a reversal in his stance on China.

In 2010, he said he was planning to learn Mandarin, and made several well-publicized trips to China over the years as Facebook explored the possibility of getting back into the world's most populous country, where it has been banned since 2009.

Those moves made Mr. Zuckerberg popular among many in China, but public opinion there has turned against him because of his recent comments, including at a congressional hearing about competition in July in which he said it was "well documented that the Chinese government steals technology from U.S. companies."

The Global Times, a publication linked to the Chinese Communist Party, this week said Mr. Zuckerberg was previously considered "the people's son-in-law," but that his recent actions suggested that he was willing "to set aside morality for profit."

Mr. Zuckerberg saw TikTok's success coming. When its predecessor app in the U.S., Musical.ly, started becoming popular among American teens in 2017, Facebook considered acquiring it, The Wall Street Journal has reported. Instead, Bytedance bought Musical.ly, and later rebranded it as TikTok.

In the October speech in Georgetown, Mr. Zuckerberg described TikTok as at odds with American values: "On TikTok, the Chinese app growing quickly around the world, mentions of protests are censored, even in the U.S. Is that the internet we want?" Mr. Zuckerberg said in his speech.

Days later, Mr. Zuckerberg reiterated his concerns about China during the White House dinner with Mr. Trump, the president's son-in-law Jared Kushner, and Facebook board member Peter Thiel, who has been a backer of Mr. Trump, according to people briefed on the conversation.

Mr. Zuckerberg's team also reached out to members of Congress who are tough on China, according to people familiar with the meetings. He asked them why TikTok should be allowed to operate in the U.S., when many American companies, including his own, can't operate in China.

In November, Sen. Josh Hawley (R., Mo.), who also had met with Mr. Zuckerberg in September, said in a hearing that TikTok threatens the privacy of American children. "For Facebook, the fear is lost social-media market share," he said. "For the rest of us, the fear is somewhat different."

Kelli Ford, a spokeswoman for Sen. Hawley said the senator's concerns about TikTok predated the meeting with Mr. Zuckerberg. "Facebook has recently been sounding the alarm about China-based tech as a PR tactic to boost its own reputation," she said.

Facebook declined to comment on Ms. Ford's remark.

--Deepa Seetharaman and Michael C. Bender contributed to this article.

Write to Georgia Wells at Georgia.Wells@wsj.com, Jeff Horwitz at Jeff.Horwitz@wsj.com and Aruna Viswanatha at Aruna.Viswanatha@wsj.com