The semi-autonomous city has been shaken by huge demonstrations this month as throngs have demanded the withdrawal of a bill that would allow extraditions to the Chinese mainland.
Trump has weighed in on Hong Kong's worst political unrest since its handover from Britain to China in 1997, saying he understood the reason for the protests and hoped demonstrators can "work it out with China".
US Secretary of State Mike Pompeo later said Trump would discuss Hong Kong with Xi at the Group of 20 summit, which is taking place in Osaka, Japan on Friday and Saturday.
But Chinese assistant foreign minister Zhang Jun said the G20 is a forum to focus on global economic issues, AFP reported.
Xi and Trump have agreed to hold bilateral talks focusing on the US-China trade war during the summit.
"I can tell you with certainty that the G20 will not discuss the Hong Kong issue and we will not allow the G20 to discuss the Hong Kong issue," Zhang said at a press briefing previewing Xi's G20 attendance.
"Hong Kong affairs are purely China's internal affairs and no foreign country has the right to intervene," he said, recalling that the city is a special administrative region of China.