The utilization of renewable energy to generate hot water and distilled water can considerably reduce pollution. This study looked at a hybrid system that used a parabolic-trough heat pipe solar collector to generate hot water while also providing drinking water. The system is constructed in two stages, the first producing distilled water and the second producing hot water. A concave mirror increases the temperature of a vacuum tube heat pipe's evaporator area and the condenser of the heat pipe, which is directly connected to the desalination system's saltwater tank. To improve the amount of drinking water generated and to transfer thermal energy to the hot water generation system, a condenser region at the top of the saltwater tank, as well as multiple heat pipes, were employed. The effect of the water flow rate (200, 300, 400 and 500 ml/min), number of heat pipes (0, 1, 2 and 4), and the filling porous medium (0, 0.3, 0.6 and 0.9 m) of the vacuum tube on the system performance were evaluated. In addition, Taguchi-Based design of experiments was used to determine the effect of independent input parameters on the energy and efficiency of the system. The results showed that the effects of water flow rate, porous medium length, and number of heat pipes on the energy efficiency were approximately 50.89%, 26.53%, and 20.6%, respectively. Furthermore, the cost of distilled water and the cost of hot water were approximately 0.0380 $/L and 1.01 $/m3, respectively. Additionally, the highest daily productivity of the system (4940 ml/day) was obtained with a water flow rate of 200 ml/min, a length of porous media of 0.6 m, and four heat pipes. The CO2 emission reduction based on the environmental and enviroexergoeconomic parameters of the proposed systems ware improved by 37.5% and 268.4%, respectively, resulting in returns of approximately $358.1 and $260.5, respectively.