To establish chronic infections, viruses must develop strategies to evade the host's immune responses. Many retroviruses, including mouse mammary tumor virus (MMTV), are transmitted most efficiently through mucosal surfaces rich in microbiota. We found that MMTV, when ingested by newborn mice, stimulates a state of unresponsiveness toward viral antigens. This process required the intestinal microbiota, as antibiotic-treated mice or germ-free mice did not transmit infectious virus to their offspring. MMTV-bound bacterial lipopolysaccharide triggered Toll-like receptor 4 and subsequent interleukin-6 (IL-6)-dependent induction of the inhibitory cytokine IL-10. Thus, MMTV has evolved to rely on the interaction with the microbiota to induce an immune evasion pathway. Together, these findings reveal the fundamental importance of commensal microbiota in viral infections.