Infection may modify the behaviour of the host and of its conspecifics in a group, potentially altering social connectivity. Because many infectious diseases are transmitted through social contact, social connectivity changes can impact transmission dynamics. Previous approaches to understanding disease transmission dynamics in wild populations were limited in their ability to disentangle different factors that determine the outcome of disease outbreaks. Here we ask how social connectivity is affected by infection and how this relationship impacts disease transmission dynamics. We experimentally manipulated disease status of wild house mice using an immune challenge and monitored social interactions within this free-living population before and after manipulation using automated tracking. The immune-challenged animals showed reduced connectivity to their social groups, which happened as a function of their own behaviour, rather than through conspecific avoidance. We incorporated these disease-induced changes of social connectivity among individuals into models of disease outbreaks over the empirically-derived networks. The models revealed that changes in host behaviour frequently resulted in the disease being contained to very few animals, as opposed to becoming widespread. Our results highlight the importance of considering the role that behavioural alterations during infection can have on social dynamics when evaluating the potential for disease outbreaks.