The livelihoods of 130 to 270 million people depend on artisanal and small-scale mining (ASM), a labor-intensive method of mineral extraction. However, a lack of data has prevented any large-scale study of the environmental and socioeconomic trade-offs caused by the main form of ASM, gold ASM. Based on geological mapping and gold price variations, we construct the first measure of gold ASM for a yearly panel of 10,628 fine-grained cells covering the African continent since 1992. We demonstrate that this exogenous measure of gold ASM triggers vegetation losses and increases household wealth. The effects are policy relevant: a one standard deviation increase in gold ASM revenues increases wealth by 2% of a standard deviation, an effect larger than the effect of drought on wealth.