The design of efficient and ultradurable hydrogen evolution reaction (HER) electrocatalysts is very important to the development of a green hydrogen economy. Herein, three examples of metal−organic frameworks (MOFs) with similar structures were designed and synthesized by adjusting the functional blocks in the structures of organic ligands. On the basis of the self-supporting material formed by these MOFs and nickel foam, we phosphated them to obtain heterojunction catalysts. Different functional blocks in the ligands have different effects on the phosphating process and thus yield different heterojunction structures. Due to the synergistic action of NiP and Ni 5 P 4 , a high catalytic performance was achieved. This work provides a theoretical direction for the study of the structure− activity relationship and the synthesis of efficient HER catalysts.