Environmental sustainability and responsible corporate governance increasingly influence corporate financial decisions, including tax behavior. However, limited evidence explains how environmental performance and Environmental, Social, and Governance (ESG) practices affect corporate effective tax rates under different financial conditions, particularly in emerging markets. This study aimed to examine the effects of environmental performance, ESG, and profitability on corporate effective tax rates and to analyze the moderating role of capital structure between profitable and loss-making firms. The study employed a quantitative research design using secondary data from companies in the Basic Materials sector listed on the Indonesia Stock Exchange during 2019–2024. Using purposive sampling, 27 firms that participated in the PROPER environmental performance program were selected, generating 162 firm-year observations. The data were analyzed using multiple regression models to compare relationships across different financial conditions. The results showed that environmental performance significantly influenced corporate effective tax rates and the effect differed between profitable and loss-making firms. ESG was also associated with corporate effective tax rates but did not show a consistent difference between firms with profits and those experiencing losses. Profitability likewise did not significantly differentiate corporate tax outcomes between the two groups. In addition, capital structure strengthened the relationship between environmental performance and corporate effective tax rates, while it did not significantly moderate the relationships involving ESG or profitability. These findings highlight the role of environmental responsibility and financial structure in shaping corporate tax behavior and provide insights for managers and policymakers in promoting sustainability, transparency, and responsible corporate governance.