When a high-pressure diaphragm compressor applied in the hydrogen refueling station, the structure strength of the cylinder head are one of the most important evaluation criteria to guarantee the reliability and efficiency of the diaphragm compressor. Considering the thermal stress, this paper described a thermal-structural coupled analysis on the cylinder head of a diaphragm compressor, in which the thermal analysis was carried out, and then the structural analysis was performed based on temperature distribution. The stress and deformation of the cylinder head under high-temperature and high-pressure conditions were obtained. The experimental method was also conducted for the verification of thermal analysis. Results indicated that during the operation of the compressor, the temperature in the discharge holes was the highest, and the stress caused by high temperature and high working pressure in the discharge holes could reach a high level due to the restriction of the structure. As a result, the region where the discharge holes were opened on the cavity surface protruded into the diaphragm cavity, resulting in plastic deformation, and the plastic deformation would also result in hydrogen embrittlement, influencing the strength of the cylinder head.