This study uses a sample of over 7000 firms in 38 countries to investigate the relation between firm valuation and earnings quality. We find a positive and significant relation between firm valuation and an aggregate earnings quality measure based on seven earnings attributes (accruals quality, persistence, predictability, smoothness, value relevance, timeliness, and conservatism). This relation is particularly strong for firms with greater investment opportunities and more need for external finance, and for firms in low investor protection countries. Thus, firms are able to compensate for a weak legal environment by adopting higher earnings quality standards, particularly when they need to gain access to global capital markets. Overall, our findings suggest that firms with higher earnings quality are valued more highly in stock markets, supporting the idea that investors require a premium for the information risk associated with lower-quality earnings.