Given its broad impact on human society, air pollution could become a non-economic factor affecting the stock market. But the impact of air pollution on the stock market performance has not received enough attention. This study examines the influence and potential mechanism of air pollution on stock market performance based on the panel data of 1344 A-share listed firms in China covering the period 2013–2019. The result shows that air pollution can negatively affect stock market performance. Second, heterogeneity analysis creatively points out that firms with less analysts, smaller size, stated-owned ownership, polluting related industry are more vulnerable to the negative effects of air pollution. Finally, the result also reveals a mechanism that air pollution could worsen the stock market by depressing investors’ sentiments. The above findings enrich current research related to the impact of air pollution on stock market performance and also provide a new perspective for investors to make stock investment decisions.