Chromosome inversions suppress genetic recombination and establish co-adapted gene complexes, or supergenes. The 2La inversion is a widespread polymorphism in the Anopheles gambiae species complex, the major African mosquito vectors of human malaria. Here we show that alleles of the 2La inversion are associated with natural malaria infection levels in wild-captured vectors from West and East Africa. Mosquitoes carrying the more-susceptible allele (2L+a) are also behaviorally less likely to be found inside houses. Vector control tools that target indoor-resting mosquitoes, such as bednets and insecticides, are currently the cornerstone of malaria control in Africa. Populations with high levels of the 2L+a allele may form reservoirs of persistent outdoor malaria transmission requiring novel measures for surveillance and control. The 2La inversion is a major and previously unappreciated component of the natural malaria transmission system in Africa, influencing both malaria susceptibility and vector behavior.