As a payload of Tianwen-1 (TW-1), the Mars Mineral Spectrometer (MMS) is tasked with acquiring hyperspectral data of the Martian surface to detect material composition. Microdeformations in optical, mechanical, and thermal components result in the MMS experiencing spectral response distortion in orbit, leading to systematic changes in pixel central wavelengths and full width at half maximum (FWHM). Known as the spectral smile, this distortion compromises the accuracy of reflectance inversion and material composition detection. This study introduces a method for detecting the spectral smile through the Martian atmospheric absorption channel, capitalizing on the distinct characteristics of the atmospheric composition and absorption patterns of Mars. A suitable technical route for in-orbit spectral smile detection was established and tested using simulation experiments and MMS-acquired hyperspectral data. Results suggest that the proposed method can attain central wavelength shifts with a maximum error of 0.32 nm and FWHM variations with a maximum error of 1.95 nm. Employing in-orbit spectral smile detection markedly enhances the correction of Martian atmospheric absorption and provides technical support for Martian surface reflectance inversion. https://github.com/wubingnote/MMS-Spectral-Smile.