It is widely known that lack of sleep damages the skin. Therefore, it is necessary to explore the relationship between sleep deprivation and skin damage and to find effective treatments. We established a 28-day sleep restriction (SR) mice model simulating continuous long-term sleep loss. We found that SR would damage the barrier function of mice's skin, cause oxidative stress damage to the skin, weaken the oscillations of the skin's biological clock, and make the circadian rhythm of Bacteroides disappear. The circadian rhythm of short-chain fatty acids (SCFA) receptors in the skin was disordered. After melatonin supplementation, the skin damage caused by SR was improved, the oscillations of the biological clock were enhanced, the circadian rhythm of Bacteroides was restored, and the rhythm of the receptor GPR43 of propionic acid was restored. We speculated that the improving effect of melatonin may be mediated by propionic acid produced by the gut microbiota. We verified in vitro that propionic acid could improve the keratinocytes barrier function of oxidative damage. We then consumed the gut microbiota of mice through antibiotics and found that oral melatonin could not improve skin damage. Moreover, supplementing mice with propionic acid could improve skin damage. Our research showed that lack of sleep impaired skin barrier function. Oral melatonin could improve skin damage by restoring the circadian rhythm of Bacteroides and its propionic acid metabolite. This article is protected by copyright. All rights reserved.