Stabilizing smallholder crop yields under changing climatic conditions in sub-Saharan Africa will require adaptation strategies focused on soil and water management. Impact studies of climate change on crop yields often ignore the potential of adaptation strategies such as rainwater harvesting (RWH). While RWH is bringing benefits to agricultural systems today, it is still unclear which regions could increasingly benefit from RWH under changing climatic conditions. Here we employ a continental scale modelling strategy using the latest CMIP5 data and explicitly take into account design factors of RWH to show that it is a valuable adaptation strategy to climate change in Africa for maize (Zea mays L.). We find that RWH can bridge up to 40 % of the yield gaps attributable to water deficits under current conditions and 31 % under future (2050s) climatic conditions during the main growing season for maize, hence providing an alternative to irrigation from scarce or inaccessible groundwater resources. RWH could increase maize yields by 14–50 % on average for the 2050s across Africa, by bridging water deficits. While in situ RWH strategies show great biophysical potential as an adaptation strategy to climate change, there remain locally specific barriers to their adoption, which will need to be addressed to ensure their successful implementation at a larger scale.