The hidden economy, as an important source of environmental pollution, can have a significant impact on environmental regulation, but it has not received much attention as an indicator of institutional weakness. Therefore, this study took the Yangtze River Economic Belt (YREB) as the research object and used the MIMIC model and entropy method to measure the hidden economic scale and environmental pollution index of its 112 cities from 2011 to 2020, respectively. We applied the spatial Durbin model to analyze the effect of heterogeneous environmental regulation (formal and informal environmental regulation) and hidden economies on pollution. It is found that: (1) the average hidden economic scale of YREB from 2011 to 2020 was between 13.15% and 14.30% and showed a slow upward trend. (2) Environmental pollution in the YREB had obvious spatial clustering characteristics, with high pollution clustering areas mainly in Chongqing in the upper reaches and Hubei, Anhui, and Jiangsu in the middle and lower reaches, while low pollution clustering areas were mainly in Yunnan and Sichuan in the upper reaches. (3) Formal environmental regulation reduced pollution directly, and on the other hand exacerbated it through interaction with the hidden economy. Overall, an environmental regulation's net effect depended on the hidden economic scale. Informal environmental regulation effectively reduced local hidden economic activity and was an effective mean to govern the hidden economy and pollution. Accordingly, the government should formulate appropriate laws and regulations to guide the legal part of the hidden economy to gradually shift to the official economy, and at the same time adopt a diversified environmental protection strategy to jointly combat pollution in the YREB.