China's working age population saw its biggest decline in 2015, underscoring demographers' warnings of an oncoming labor shortage in the country.

The number of workers aged 16 to 59 dropped by a record 4.87 million to 911 million last year, compared to decline of 3.71 million in 2014, according to China's National Bureau of Statistics.

The trend coincides with China's slowing economic growth, mirroring Japan's experience in the 1990s. The decline has sparked concern that China may be poised to repeat its neighbor's history of economic struggles and that China may grow older before it grows richer.

It also coincides with a decline in China's migrant workers. People who typically leave their hometowns to seek employment in other cities decreased last year for the first time in 30 years. The migrant population declined by 5.68 million to 247 million people at the end of 2015, according to the NBS.

A shrinking labor pool can help prevent a high joblessness rate. But it is also driving up labor costs and is chipping away at a competitive advantage that has boosted China's manufacturing and export sectors for decades.

Demographers have long sounded the alarm that China may pay the price for strict population controls, cautioning that the one-child policy era would weigh on growth prospects.

As workers become scarcer, they also become more demanding, pushing for higher wages and more benefits. Labor protests climbed in December to a record-high of 422 incidents, according to Hong Kong advocacy group . The group counted 2,774 labor incidents, many of which were tied to wage disputes, on the mainland last year—double the 2014 figure.

in China by the American Chamber of Commerce in China found that 54% of U.S. firms say labor costs are their biggest challenges to operating in the country.

Leaders at China's National Health and Family Planning Commission say they have it under control. They announced last year the and have enabled all couples to have two children, with the goal of repopulating the future labor pool.

China’s is adequate, said Wang Pei’an, deputy head of the commission, . It's the quality of workers, not the quantity that's the problem, Mr. Wang said.

China has the world's largest population, with 1.37 billion people, but the country is aging and birth rates are declining. The United Nations projects that the number of Chinese over the age of 65 will jump 85% to 243 million, in 2030, up from 131 million this year. Most couples say it's too expensive to have more children.

--Laurie Burkitt. Follow her on Twitter @lburkitt.