This paper offers a historical micro-level analysis of the impact of climatic shocks on the incidence of conflict in colonial Nigeria (1912–1945). Primary historical sources on court cases, prisoners and homicides are used to construct an index of socio-political conflict using principal component analysis and measure climatic shocks through deviations from long-term rainfall patterns in a nonlinear (U-shaped) relation, capturing both drought and excessive rainfall. We find a robust and significant relationship between rainfall deviations and conflict intensity, which tends to be stronger in agro-ecological zones that are least resilient to climatic variability (such as Guinean savannah) and where (pre-) colonial political structures were less centralized. We find tentative evidence that the relationship is weaker in areas that specialize in the production of export crops (such as cocoa and palm oil) compared to subsistence farming areas, suggesting that agricultural diversification acts as an insurance mechanism against the whims of nature. Additional historical information on food shortages, crop-price spikes and outbreaks of violence is used to explore the climate–conflict connection in greater detail.