TIANJIN, China — Some look like high-tech firms, promising young college graduates a fast track to riches. Others pose as charitable groups on a membership drive, or companies building a sales network for a new product. Tens of millions across China are signing up — and learning that all is not as advertised.

Behind these groups is a looming challenge for the ruling Communist Party: A proliferation of pyramid schemes that have attracted enormous followings and huge sums of money, exploiting — and exacerbating — widespread anxiety over a slowing economy.

More than 40 million people are now ensnared, perhaps many more, according to the China Anti-Pyramid Selling Association, a nongovernmental group. One scheme shut down this summer was reported to have registered more than five million people alone, while another in southern China took in at least $54 million. Last year, the authorities investigated more than 2,800 cases, a 19 percent increase from 2015.

New recruits are asked to hand over cash and persuade others to do the same. The more people they bring in, the more they and their bosses earn. But if too many people quit or the schemes run out of new members willing to pay, the pyramids collapse, bankrupting families in a chain reaction and adding to the strains on the Chinese financial system.