HONG KONG — The N.B.A. superstar LeBron James has routinely insulted President Trump. Two of the league’s most successful coaches, Steve Kerr and Gregg Popovich, have repeatedly slammed American lawmakers for inaction on gun legislation. And other basketball stars regularly speak out on social and political issues — police shootings, elections and racism — without fear of retribution from the league.

But this weekend, a Houston Rockets executive unwittingly exposed an issue that may have been too much for the National Basketball Association: support for protesters in Hong Kong, which infuriated China.

“Fight for freedom, stand with Hong Kong,” read an image posted on Twitter by Daryl Morey, the general manager of the Rockets. It was quickly deleted.

But the damage was done, and the N.B.A. quickly moved to smooth things over in a lucrative market that generates millions of dollars in revenue. The league said it was “regrettable” that many Chinese fans were offended by the comment.