Trump specifically accused Kerr and Popovich of hypocrisy in their reactions to the dispute with China because they have often criticized the president's domestic policies. He claimed Kerr "was like a scared little boy" when he responded to a question about China on Monday.

A spokesman for the NBA did not immediately respond to CNBC's request for comment on the president's remarks. CNBC could not immediately reach the Warriors and Spurs for comment.

The NBA has tried to contain the economic damage in its massive China market this week after Houston Rockets general manager Daryl Morey tweeted in support of the pro-democracy movement in Hong Kong. As organizations and businesses in China cut off their relationships with the NBA , critics on Capitol Hill and elsewhere have said the league put cash over human rights by not initially defending Morey's comments strongly enough.

"They have to work out their own situation. The NBA's — they know what they're doing," Trump told reporters in his first public comments about the issue when asked about it by CNBC. "I watched the way that [Golden State Warriors coach Steve] Kerr and [San Antonio Spurs coach Gregg] Popovich and some of the others were pandering to China, and yet to our own country, it's like they don't respect it."

President Donald Trump criticized NBA coaches for what he called "pandering" to China on Wednesday even as he declined to take a stance on the sports league's dispute with Beijing.

President Donald Trump speaks during an "Opportunity Zone" conference with state, local, tribal, and community leaders at the White House in Washington, April 17, 2019.

Asked if he had thoughts about the conflict between the NBA and China, Kerr said, "I don't." He added that "it's easy to speak on issues that I'm passionate about and feel like I'm well-versed on" but suggested he did not have enough knowledge to talk about China politics.

On Tuesday, Popovich said Silver "has been a heck of a leader." He took a veiled shot at Trump, saying that "compared to what we've had to live through the last three years, there's a big difference gap there leadership wise and courage wise."

An initial league statement Sunday in response to Morey's tweet said the NBA recognized the GM's views "deeply offended many of our friends and fans in China, which is regrettable." In subsequent comments Monday, NBA Commissioner Adam Silver said he acknowledged "our initial statement left people angered, confused or unclear on who we are or what the NBA stands for."

"It is inevitable that people around the world — including from America and China — will have different viewpoints over different issues. It is not the role of the NBA to adjudicate those differences," Silver said.

He continued: "However, the NBA will not put itself in a position of regulating what players, employees and team owners say or will not say on these issues. We simply could not operate that way."

A protest movement, initially sparked by a bill to allow extraditions to mainland China, has gone on for months in the semi-autonomous Hong Kong. Protesters have accused police of excessive force as clashes in Hong Kong grow more violent.

Morey's now deleted Friday tweet read, "Fight for Freedom. Stand with Hong Kong." He since apologized for the comment.

Trump has faced his own charges of pandering to China as he seeks a trade deal with the world's second--largest economy and looks for Beijing's help in the denuclearization of North Korea. He has repeatedly said he does not "blame" China for the trade abuses he seeks to end.

Trump has also referred to Chinese President Xi Jinping — whose authoritarian regime is accused of various human rights abuses, including the detention and surveillance of Muslim minority groups — as a "friend."

The U.S. took steps to sanction officials and entities alleged to be involved in those abuses earlier this week. Trade talks between the U.S. and China resume on Thursday.

Trump's family and White House have ties to the league the president criticized on Wednesday. Josh Kushner, the brother of Trump's son-in-law and advisor Jared Kushner, is a part owner of the NBA's Memphis Grizzlies, according to The New York Times.

Jared Kushner has also attended sporting events with Silver, according to the newspaper.

— CNBC's Kevin Breuninger contributed to this report.

Editor's note: This article was updated to better reflect that Trump's criticism targeted Kerr and Popovich.