The effects of microbiota on the development of psychiatric disorders is not clear. Here, daily gavage of saline in non-obese diabetic (NOD) mice (but not controls) induced social avoidance behaviour and decreased myelination in the prefrontal cortex (PFC). Transfer of gut microbiota from saline-treated NOD mice to naive controls induced social deficits and lowered expression of myelin-associated genes in the PFC of recipients. Thus, changes in microbiota can alter gene expression and behaviour.