HONG KONG—The integration of Hong Kong with mainland China was preordained in handover talks the U.K. held with Beijing in the 1980s. The year 2047 was the due date.

It is coming ahead of schedule.

Hong Kong, long an outpost of free trade and reliable courts beside Communist China, is coming under increasing pressure from Beijing and local leaders to mold itself in the mainland’s image. That is despite Beijing’s pledges to keep the city largely autonomous for half a century after the handover in 1997.

Legislators, publishers and journalists say freedom of expression is being restricted. Several candidates for Hong Kong’s legislative elections recently were disqualified from running because they advocated independence from China. Hong Kong authorities have issued warnings to educators to rein in young people’s interest in independence.

The tidal pull of China’s giant economy is making Hong Kong more dependent on the mainland than ever. Mainland tycoons and state-owned enterprises are snapping up Hong Kong assets, including its leading English-language newspaper and choice real estate.