Optic neuritis (ON) is an inflammatory, demyelinating, and neurodegenerative condition of the optic nerve, which might induce permanent vision loss. Currently, there are no effective therapies for this disorder. We have developed an experimental model of primary ON in rats through a single microinjection of 4.5 μg of bacterial lipopolysaccharide (LPS) into the optic nerve. Since melatonin acts as a pleiotropic therapeutic agent in various neurodegenerative diseases, we analyzed the effect of melatonin on LPS-induced ON. For this purpose, LPS or vehicle were injected into the optic nerve from adult male Wistar rats. One group of animals received a subcutaneous pellet of 20 mg melatonin at 24 hr before vehicle or LPS injection, and another group was submitted to a sham procedure. Melatonin completely prevented the decrease in visual evoked potentials (VEPs), and pupil light reflex (PLR), and preserved anterograde transport of cholera toxin β-subunit from the retina to the superior colliculus. Moreover, melatonin prevented microglial reactivity (ED1-immunoreactivity, P < 0.01), astrocytosis (glial fibrillary acid protein-immunostaining, P < 0.05), demyelination (luxol fast blue staining, P < 0.01), and axon (toluidine blue staining, P < 0.01) and retinal ganglion cell (Brn3a-immunoreactivity, P < 0.01) loss, induced by LPS. Melatonin completely prevented the increase in nitric oxide synthase 2, cyclooxygenase-2 levels (Western blot) and TNFα levels, and partly prevented lipid peroxidation induced by experimental ON. When the pellet of melatonin was implanted at 4 days postinjection of LPS, it completely reversed the decrease in VEPs and PLR. These data suggest that melatonin could be a promising candidate for ON treatment.