Melatonin, an evolutionarily conserved molecule, is implicated in numerous physiological processes in plants. To explore the potential roles of melatonin in response to UV-B radiation, we examined the influence of exogenous melatonin on Malus hupehensis Rehd. seedlings under two levels of UV-B radiation. Under UV-B stress, seedlings showed significant reduction in plant growth, biomass production, and root system development. However, 1 μM melatonin solution markedly alleviated these effects, especially at the higher dosage of UV-B radiation. The inhibitory effects of UV-B radiation on photosynthetic parameters, chlorophyll fluorescence parameters, stomatal apertures, chlorophyll levels and leaf membrane damages were also markedly alleviated with melatonin application. Melatonin treatment was also associated with higher activity and expression of genes encoding antioxidant enzymes (ascorbate peroxidase, catalase and peroxidase) and greater decline of H2O2 content in leaves exposed to UV-B. Moreover, exogenous melatonin treatment and UV-B stress increased the concentration of endogenous melatonin. The content of several phenolic compounds, including chlorogenic acid, phloridzin and quercetin-3-galactoside, also increased under UV-B stress, and these were further elevated significantly with melatonin addition. This study provides insight into the role(s) of endogenous melatonin in response to UV-B stress, and will facilitate application of exogenous melatonin in agriculture.