Ms. Li, the investor, was defensive about the intentions of Shanxinhui. But she also gave a fervent description of how it worked by drawing in more investors attracted to profiting through good works.

“Many people don’t understand us and call us a pyramid scheme,” Ms. Li said. “What we sell to people is benevolence. When they first join the group, their purpose might be to make money. But as you get to know more about the program, your main focus will shift to help other people. I’ve helped 17 members of the group with the money I earned from this program.”

The protesters in Beijing carried banners that said Shanxinhui had been “persecuted” and they called on President Xi and his government to investigate their complaints. Chinese social media users have posted about protests in other Chinese cities in recent weeks related to the company.

“Xi Jinping, solve the reasonable demands of the public swiftly and lawfully,” said one banner shown on social media.

But this noisy and sizable demonstration is likely to be especially galling for the government, which prizes stability in the capital.

Beijing will host a Communist Party Congress this autumn that will inaugurate a second five-year term for Mr. Xi, who is party general secretary as well as president. The buildup to that meeting has intensified official worries about unrest in the capital.