Xi met Lam on the sidelines of a trade event in Shanghai on Monday night amid signals from China's central government that it may tighten its grip on Hong Kong to quell the unrest that has at times challenged Chinese rule.
When asked if the meeting reflected Xi's worry about Lam's handling of the unrest, Hong Kong Chief Secretary Matthew Cheung said: "The reverse is true."
"The very fact that he is so busy, that he found time to meet, really is a vote of confidence in ourselves" and underlined the importance that Beijing attaches to Hong Kong, Cheung said at a news conference.
Xi "has a high degree of confidence in the chief executive and also certainly the work of the present government and the political team, so all these are pretty reassuring to us," he added.
Pro-democracy lawmaker Claudia Mo warned of a tougher stance by Beijing.
"They realized things in Hong Kong have reached a point of no return and there is no choice except for keeping their approval for Carrie Lam with hopes that things will die down," Mo told the Associated Press. "The message to Hong Kong people is that we are with her, she has our backing and you better watch out."
China's official Xinhua News Agency reported that Xi expressed his government's "high degree of trust" in Lam to stabilize the situation after she briefed him on the crisis.
But Xi also "demanded unswerving efforts to stop and punish violent activities in accordance with the law" as restoring order was a top priority for Hong Kong, Xinhua said. He also called for more dialogue and efforts to improve people's livelihoods in one of the world's most expensive cities.
China's Communist Party last week indicated it may try to find a way to enact anti-subversion laws in Hong Kong, after such measures were shelved previously due to public opposition.
The protests began in June against an extradition bill that would have allowed suspects to be sent for trials in mainland China, which many saw as infringing on Hong Kong's judicial freedoms and other rights that were guaranteed when the former British colony return to China in 1997.
Lam abandoned the bill three months into the protests, but the movement by then had grown into calls for greater democracy and police accountability and had become the biggest challenge to Xi since he came to power in 2012. Lam has invoked emergency powers to ban the use of facial coverings at rallies, provoking further anger.
Hundreds of students defiantly wore masks, including Guy Fawkes mask that is a protest symbol worldwide, in schools Tuesday to mark the one-month anniversary of the ban, local media said. Calls emerged online for protesters to wear Guy Fawkes masks at evening gatherings.
Protests in recent weeks have been marked by violence as hardcore anti-government demonstrators set fires and trashed facilities in clashes with police who used tear gas, and as brawls occurred between the demonstrators and pro-Chinese activists.
More than 3,000 people have been arrested since June and in a bloody incident Sunday, a knife-wielding man believed to be a Beijing supporter slashed two people after an argument and bit off part of a politician's ear outside a mall. Police said they arrested the assailant as well as two men who attacked him.
On Saturday, a mob battered a Beijing supporter unconscious and stripped him naked in a scene captured by local media.
Cheung said the government plans to hold a second community dialogue after Nov. 24 district elections. Lam held her first town hall meeting on Sept. 26 where she was criticized by angry residents.
Cheung said officials have also continued private talks with small groups of people to find a way out of the crisis, which helped push the city into a recession for the first time in a decade as it grapples with impact from the U.S.-China trade war.