Two-dimensional porphyrin-based covalent-organic frameworks (2D-por-COFs) have gained significant attention as attractive platforms for efficient solar light conversion into hydrogen production. Herein, it is found that introducing transition metal zinc and polyethylene glycol (PEG) into 2D-por-COFs can effectively improve the photocatalytic hydrogen evolution performance. The photocatalytic hydrogen evolution rate of ZnPor-COF is 2.82 times higher than that of H2Por-COF. Moreover, ZnPor-COF@PEG has the highest photocatalytic hydrogen evolution efficiency, which is 1.31 and 3.7 times that of pristine ZnPor-COF and H2Por-COF, respectively. The filling of PEG makes the layered structure of COFs more stable. PEG reduces the distortion and deformation of the carbon skeleton after the experiment of photocatalytic hydrogen evolution. The layered stacking and crystallization of 2D-por-COFs are also enhanced. Meanwhile, the presence of PEG also accelerates the transfer of excited electrons and enhances the photocatalytic hydrogen evolution activity. This strategy will provide valuable insights into the design of 2D-por-COFs as efficient solid photocatalysts for solar-driven hydrogen production.