Exposure to ultraviolet (UV) irradiation causes damage to the skin and induces photoaging. UV irradiation stimulates production of reactive oxygen/nitrogen species, which results in activation of epidermal growth factor receptor (EGFR) and mitogen-activated protein kinases (MAPK) in fibroblasts. MAPKs are responsible for activation of activator protein-1 (AP-1), which subsequently upregulates expression of matrix metalloproteinases (MMPs). Melatonin is a potent free radical scavenger which is known to have photoprotective effects. The aim of this study is to investigate the underlying molecular mechanisms for the photoprotective effects of melatonin in UVB-irradiated primary human dermal fibroblasts (HDFs) in terms of EGFR activation, oxidative/nitrosative damage, JNK/AP-1 activation, MMP activities, and the levels of tissue inhibitors of metalloproteinase-1 (TIMP-1) and type I procollagen (PIP-C). In this study, HDFs were pretreated with 1 μM of melatonin and then irradiated with 0.1 J/cm2 of UVB. Changes in the molecules were analyzed at different time points. Melatonin inhibited UVB-induced oxidative/nitrosative stress damage by reducing malondialdehyde, the ratio of oxidized/reduced glutathione, and nitrotyrosine. Melatonin downregulated UV-induced activation of EGFR and the JNK/AP-1 signaling pathway. UVB-induced activities of MMP-1 and MMP-3 were decreased and levels of TIMP-1 and PIP-C were increased by melatonin. These findings suggest that melatonin can protect against the adverse effects of UVB radiation by inhibiting MMP-1 and MMP-3 activity and increasing TIMP-1 and PIP-C levels, probably through the suppression of oxidative/nitrosative damage, EGFR, and JNK/AP-1 activation in HDFs.