The fate of melanin in the epidermis is of great interest due to its involvement in numerous physiological and pathological processes in the skin. Melanin localization can be assessed ex vivo and in vivo using its distinctive optical properties. Melanin exhibits a characteristic Raman spectrum band shape and discernible near-infrared excited (NIR) fluorescence. However, a detailed analysis of the capabilities of depth-resolved confocal Raman and fluorescence microspectroscopy in the evaluation of melanin distribution in the human skin is lacking. Here we demonstrate how the fraction of melanin at different depths in the human skin in vivo can be estimated from its Raman spectra (bands at 1,380 and 1,570 cm−1) using several procedures including a simple ratiometric approach, spectral decomposition and non-negative matrix factorization. The depth profiles of matrix factorization components specific to melanin, collagen and natural moisturizing factor provide information about their localization in the skin. The depth profile of the collagen-related matrix factorization component allows for precise determination of the dermal–epidermal junction, i.e. the epidermal thickness. Spectral features of fluorescence background originating from melanin were found to correlate with relative intensities of the melanin Raman bands. We also hypothesized that NIR fluorescence in the skin is not originated solely from melanin, and the possible impact of oxidized species should be taken into account. The ratio of melanin-related Raman bands at 1,380 and 1,570 cm−1 could be related to melanin molecular organization. The proposed combined analysis of the Raman scattering signal and NIR fluorescence could be a useful tool for rapid non-invasive in vivo diagnostics of melanin-related processes in the human skin.