Using a sample of Brazilian listed companies, our study investigates the directional cause–effect relationship between market structure, ESG performance, and firm efficiency under a Stochastic Structural Relationship Programming (SSRP) model. Our empirical evidence is threefold. First, our findings indicate that firms with better environmental performance are more efficient, whereas lower ESG performance and poorer corporate governance practices are associated with a higher level of efficiency. Second, our study suggests that market structure measures (i.e., competition, concentration, and market power) have heterogeneous impacts on various ESG indexes. Specifically, higher market competition is associated with a lower concentration, better ESG performance and environmental performance, but worse corporate governance performance, although market power can only enhance the environmental and governance performance of firms. Third, the market structure proxies employed in this study are significantly attributed to firm efficiency. Our findings provide practical implications for various stakeholders and suggest avenues for future studies that can build on our evidence.