Xi arrives in Hong Kong amid protests over Beijing's perceived interference as it marks 20 years of Chinese rule.
Chinese President Xi Jinping said on Thursday China would work to ensure a "far-reaching future" for Hong Kong's autonomy.
"Hong Kong has always tugged at my heartstrings," Xi said on arrival at Hong Kong airport for the handover anniversary in front of flag-waving crowds at the start of a three-day visit.
But Xi faces a divided city with protesters angered by Beijing's perceived interference as it marks 20 years of Chinese rule.
Britain returned Hong Kong to Chinese rule on July 1, 1997, under a "one country, two systems" formula which guarantees wide-ranging freedoms and judicial independence unseen in mainland China.
A huge security operation shut down large parts of the normally throbbing city, with thousands of police deployed to keep away demonstrators angry at Beijing's tightening grip on the freedoms of nearly eight million people.
TRT World spoke to Patrick Fok in Hong Kong about significance of the Xi's visit.
The lockdown reflects Beijing's concern that nothing should be allowed to taint the high-profile visit, ahead of a key Communist Party congress later this year which is expected to cement Xi's position as the most powerful Chinese leader in a generation.
More than 20 activists – including Joshua Wong and young legislator Nathan Law – remained in custody after being arrested for causing a "public nuisance" during a night protest on Wednesday.
The three-day visit is Xi's first since becoming leader in 2013, and comes three years after huge pro-democracy protests crippled the semi-autonomous city for months as Umbrella Movement campaigners camped out on thoroughfares.
Beijing has promised Hong Kong's capitalist system will remain unchanged for "at least" 50 years until 2047, but it has not clarified what happens after that.
"... We are willing, together with different sectors of Hong Kong society, to look back on Hong Kong's unusual course in the past 20 years, draw conclusions from the experience, look into the future and to ensure "one country, two systems" is stable and has a far-reaching future."
Xi's message was consistent with those of other senior Chinese leaders visiting Hong Kong in the past, that Beijing would safeguard the city's development, prosperity and people's livelihoods.
In reality, however, fears of the creeping influence of Communist Party leaders in Beijing have been starkly exposed in recent years by the abduction by mainland agents of some Hong Kong booksellers who specialised in politically sensitive material and Beijing's efforts in disqualifying two pro-independence lawmakers elected to the city legislature.
Xi did not respond to journalists, including one who asked whether Liu Xiaobo, China's Nobel Peace Laureate and jailed dissident, would be released and allowed to travel overseas to be treated for cancer.
Praise for Hong Kong's leader
Speaking later, Xi praised Hong Kong's outgoing leader, Leung Chun-ying, who cracked down hard on pro-democracy Occupy protests in 2014, for his substantial contributions to the country, "especially safeguarding national security."
"These past five years have not been easy at all," Xi added.
An annual July 1 protest pressing for social causes, including a call for full democracy, is expected to take place after Xi leaves on Saturday. On Wednesday night, police arrested pro-democracy protesters, some of whom scrambled up a monument symbolising the city's handover from British to Chinese rule.
Part of the major rift under Chinese rule in Hong Kong has been a push by activists, including the 2014 street protests, to get China to live up to a constitutional promise under Hong Kong's mini-constitution, the Basic Law, to allow universal suffrage as an "ultimate aim."
"This promise has been shattered under the watchful eyes of the whole world," organisers of Saturday's planned rally wrote in a statement. "Hong Kong has been lied to for 20 years. Let's retake Hong Kong for a real and fully fledged democracy."
Xi, on his first visit to Hong Kong as China's president, will oversee the swearing-in of the city's first female leader, Carrie Lam. He will also visit the local People's Liberation Army garrison and meet establishment figures. His wife, Peng Liyuan, is expected to visit a kindergarten and a care home for old people.
The streets of Hong Kong have been festooned with Chinese banners and paraphernalia, including two huge harbour-front screens carrying celebratory messages. Upwards of 120,000 youngsters will join China patriotic activities at a time of growing disillusionment with Beijing among the city's younger generation.
"We ... just hope our people can live in peace and contentment," said Lee Wing-lung, 66, a retired engineer standing opposite the hotel where Xi is staying, taking snapshots with his phone.
"I hope Hong Kong can have a good and peaceful atmosphere."
Over the past five years, under Xi's tenure as Chinese leader and amid a ferocious crackdown on dissent on the mainland, the squeeze on Hong Kong's autonomy has intensified, say some diplomats, activists and citizens.
"Xi Jinping's visit is a great chance for us to protest against him," said Law Sui-Yung, 63, a retired primary school teacher, who watched Xi's arrival on a giant screen in the shopping district of Causeway Bay with a muted crowd of around 150 people.
"In recent years, especially after he took office, Hong Kong has seriously deteriorated into one of the mainland (Chinese) cities," she added.