Solar desalination system is a practical and sustainable process for improving the quality of life in regions suffering from water scarcity. This study aims to improve the efficiency of a single slope solar still by implementing a dynamic layer of phase change material (PCM). To achieve this objective, three solar stills are studied and compared numerically: conventional solar still (CSS), solar still with fixed layer of PCM (SSP), and solar still with moving layer of PCM (SSPM). A numerical investigation was conducted on a typical sunny day of Agadir, Morocco. The effect of the moving PCM on the daily freshwaetr output, energy, and exergy efficiency has been considered, based on the numerical solution of the energy balance equations. Furthermore, the energy payback time, economic, exergoeconomic, environmental, and enviroeconomic analyses are carried out for the three solar stills. The results reveal that, the use of a moving layer of phase change material, allows the solar still to function conventionally during daylight hours and as a solar still with PCM during the night-time. Consequently, the daily freshwater yield of CSS, SSP, and SSPM is 5.28, 4.9 and 6.04 kg/m2.day, respectively. Moreover, it is observed that the SSPM system achieve the highest levels of energy efficiency, exergy efficiency, and net CO2 mitigation, with respective values of 62.11 %, 5.31 %, and 29.24 tons.