Ultraviolet radiation is markedly increased because of pollution and the depletion of the stratospheric ozone layer. Excessive exposure to sunlight can negatively affect the skin, resulting in sunburn, photo-aging, or skin cancer. In this study, we first determined the photoprotective effect of sanshool, a major component in Zanthoxylum bungeanum, on UVB-irradiated responses in human dermal fibroblasts (HDFs) and nude mouse. We found that sanshool treatment can protect cells against the effects of UVB irradiation by (i) increasing cell viability, (ii) inhibiting MMP expression, and (iii) inducing autophagy. We also used the recombinant CSF2 or anti-CSF2 antibody co-cultured with human dermal fibroblasts (HDFs) and found that CSF2 contributes to sanshool-induced autophagy. Sanshool hindered the UVB-induced activation of JAK2-STAT3 signaling in HDFs, thereby inhibiting the expression of MMPs and activation of autophagic flux. Exposure of the dorsal skin of hairless mice to UVB radiation and subsequent topical application of sanshool delayed the progression of skin inflammation, leading to autophagy and inhibiting the activation of JAK2-STAT3 signaling. These results provide a basis for the study of the photoprotective effect of sanshool and suggest that it can be potentially used as an agent against UVB-induced skin damage in humans.