The present paper addresses the thermodynamic modeling and multi-objective optimization of a solar-based multi-generation system producing hot water, heating, cooling, hydrogen, and freshwater using a humidification and dehumidification (HDH) unit. Usually, in areas with high radiation intensity, the shortage of drinking water is severe; therefore, using multi-generation systems with solar energy as the prime mover can be a promising option in these areas. The main goals of the current work are multi-aspect assessment and optimization of a solar system to generate potable water and other valuable products. The proposed system is examined using thermodynamic modeling and environmental simulation from different aspects in the present study. The exergy destruction evaluation rate showed that the heliostat had the highest exergy destruction rate, gauged at 1867 kW. Also, in terms of exergy efficiency, the pump and heliostat units had the lowest exergy efficiency, with values of 52.09 % and 65.39 %. Parametric analysis was implemented to find the effect of changing different parameters on the yield of produced fresh water, exergy efficiency, exergy destruction rate, coefficient of performance (COP), sustainability index (SI), and produced hydrogen. Results showed that increasing the compressor pressure ratio from 2 to 6 elicits a reduction in freshwater flow rate and COP. Similarly, increasing the outlet pressure from 70 to 80 bar reduced exergy efficiency and freshwater production. Furthermore, owing to the different effects of the parameters on the studied system, multi-objective optimization was performed using the evolutionary genetic algorithm.