“We want to disrupt conventional ways of thinking,” Mr. Kang said. “Chinese women think that if you treat men well, they’ll love you more. But often, we men love the people who hurt us the most.”

One response to marital infidelity is divorce. But divorce can be costly, especially for women. Aside from the social stigma that falls more heavily on women, family property and finances in China tend to be registered in the husband’s name. A divorced woman can find herself homeless, adding to the pressure of taking measures to save the marriage.

But many Chinese men resist discussing marital problems with marriage counselors or other outside professionals, said Tang Yinghong, a psychologist and columnist based in Leshan, Sichuan Province. “Husbands in China still hold the traditional view that a family’s dirty laundry should not be aired publicly,’’ he said.

And the wives, unwilling to undergo a difficult divorce, he said, “would rather turn to a mistress dispeller behind their husbands’ back.’’ Ideally, the husband never finds out why his mistress left him.

The services are not cheap. Mr. Kang charges a base fee of 300,000 renminbi, about $45,000, but he said that costs can mount if counselors need to rent expensive apartments or cars to endear themselves to the mistresses. Clients usually pay half the fee in advance and the balance once the case is successfully concluded. Mr. Kang said the balance is waived if the mistress is not dispelled, but he put his success rate at 90 percent, in part because he only takes on cases he thinks can be solved.

The companies say it typically takes about three months to dispel a mistress. Yu Feng, director of the Chongqing Jialijiawai Marriage and Family Service Center, said his team has dispelled 260 mistresses in the last two years.

Recently, however, mistress-dispelling services have faced new challenges.

Since he came to power in late 2012, President Xi Jinping has waged an aggressive campaign against official corruption. More than 280,000 officials were penalized for such abuses in 2015 alone. Austerity measures that include bans on extravagant consumption have also made keeping a mistress more hazardous to officials’ careers. A study in 2013 by Renmin University found that 95 percent of corrupt officials kept mistresses. In some cases, officials have found their misdeeds reported to investigators by discontented lovers.