PurposeFinancial market sustainability is gaining attention as investors and stakeholders become more aware of environmental, social and governance issues, pushing demand for responsible and ethical investment practices. Therefore, this study aims to investigate the impact of carbon (CO2) emissions from three sources, oil, gas and coal, on the stock market sustainability via effective government policies.Design/methodology/approachThe eight countries belong to two different regions of world: Asian economies such as Pakistan, India, Malaysia and China, and OECD economies such as Germany, France, the UK and the USA are selected as a sample of the study. The 22-year data from 2000 to 2022 are collected from the DataStream and the World Bank data portal for the specified countries. The generalized methods of movement (GMM) and wavelet are used as the econometric tool for the analysis.FindingsOur findings show that the CO2 emission from coal and gas significantly negatively impacts stock market sustainability, but CO2 emission from oil positively impacts stock market sustainability. Moreover, all the emerging Asian economies’ CO2 emissions from coal and gas have a much greater significant negative impact on the stock market sustainability than the OECD countries due to the critical situation. However, the government’s effective policies have a positive significant moderating impact between them, reducing the effect of CO2 emission on the stock market.Research limitations/implicationsThis study advocated strong implications for policymakers, governments and investors.Practical implicationsEffective government policies can protect the environment and make business operations suitable, leading to market financial stability. This study advocated strong implications for policymakers, governments and investors.Originality/valueThis study provides fresh evidence of the government’s effective role to control the carbon environment that provide the sustainability to the organizations with respect to OECD and emerging economy.