There is increasing concern about potential long-term effects of antibiotics on children's health. Epidemiological studies have revealed that early-life antibiotic exposure can increase the risk of developing immune and metabolic diseases, and rodent studies have shown that administration of high doses of antibiotics has long-term effects on brain neurochemistry and behaviour. Here we investigate whether low-dose penicillin in late pregnancy and early postnatal life induces long-term effects in the offspring of mice. We find that penicillin has lasting effects in both sexes on gut microbiota, increases cytokine expression in frontal cortex, modifies blood-brain barrier integrity and alters behaviour. The antibiotic-treated mice exhibit impaired anxiety-like and social behaviours, and display aggression. Concurrent supplementation with Lactobacillus rhamnosus JB-1 prevents some of these alterations. These results warrant further studies on the potential role of early-life antibiotic use in the development of neuropsychiatric disorders, and the possible attenuation of these by beneficial bacteria.