Côte d’Ivoire and Ghana, the world’s largest producers of cocoa, account for two thirds of the global cocoa production. In both countries, cocoa is the primary perennial crop, providing income to almost two million farmers. Yet precise maps of the area planted with cocoa are missing, hindering accurate quantification of expansion in protected areas, production and yields and limiting information available for improved sustainability governance. Here we combine cocoa plantation data with publicly available satellite imagery in a deep learning framework and create high-resolution maps of cocoa plantations for both countries, validated in situ. Our results suggest that cocoa cultivation is an underlying driver of over 37% of forest loss in protected areas in Côte d’Ivoire and over 13% in Ghana, and that official reports substantially underestimate the planted area (up to 40% in Ghana). These maps serve as a crucial building block to advance our understanding of conservation and economic development in cocoa-producing regions.