Graded concentrations of dietary melatonin were fed to examine the effects on performance and gastric ulcers in pigs. Four levels of melatonin, 0, 2.5, 5, and 10 mg kg−1, were fed m a finely ground corn–wheat based diet (578 ± 1.89 μm), designed to induce gastric ulcers, to 64 Yorkshire barrows and gilts between 22.2 ± 2.0 and 102.5 ± 4.3 kg. At postmortem, ulcers were scored from 0 (no ulcer) to 3 (severe ulcer). Volume, percent moisture, pH, and bile acid concentration of the stomach digesta were determined. Melatonin supplementation was associated with a decreasing severity of ulcers (P < 0.05). There were no differences in average daily gain between melatonin treatments, although 10 mg kg−1 diet caused a reduction in feed intake. Bile acid concentration in the stomach digesta was highest in pigs receiving the control diet without melatonin (P < 0.05) and was increased with increasing ulcer severity (P < 0.05). Key words: Swine, ulcer, diet, melatonin, bile, acids