Selection can favour the evolution of individually costly dispersal if this alleviates competition between relatives. However, conditions that favour altruistic dispersal also mediate selection for other social behaviours, such as public goods cooperation, which in turn is likely to mediate dispersal evolution. Here, we investigate – both experimentally (using bacteria) and theoretically – how social habitat heterogeneity (i.e. the distribution of public goods cooperators and cheats) affects the evolution of dispersal. In addition to recovering the well-known theoretical result that the optimal level of dispersal increases with genetic relatedness of patch mates, we find both mathematically and experimentally that dispersal is always favoured when average patch occupancy is low, but when average patch occupancy is high, the presence of public goods cheats greatly alters selection for dispersal. Specifically, when public goods cheats are localized to the home patch, higher dispersal rates are favoured, but when cheats are present throughout available patches, lower dispersal rates are favoured. These results highlight the importance of other social traits in driving dispersal evolution.