Ground heat exchangers, which enable the utilization of shallow geothermal energy, have been widely used in recent years in order to improve the performance of systems. In the present study, theoretical performance of a humidificationdehumidification desalination system integrated with a ground heat exchanger in order to increase the productivity of the system was investigated. The system employed photovoltaic-thermal panels and polymer electrolyte membranes to meet the electrical and thermal energy requirement as well as producing hydrogen, respectively. The present study examined the impact of each parameter, namely solar radiation, soil temperature, and mass flow rate on the gained output rate, thermal efficiency of the photovoltaic-thermal panel, the amount of fresh water, and hydrogen production. The results revealed that the solar radiation, soil temperature, and the mass flow rate ratio had a significant impact on the performance of the system, and that the capacity of hydrogen and fresh water production, and the gained output ratio of the system were in the range of 0.08-0.16 kg/h, 2-16 kg/h, and 0.1-0.5, respectively.