A cobalt(ii) tetrakis(2,3,5,6-tetrafluoro-4-ethynylphenyl)porphyrin (FCoP-H) was designed and synthesized. With carbon-nanotube-templated polymerization, covalent porphyrin frameworks using FCoP-H can be synthesized via the Hay-coupling. The resulting FCoP@CNT is efficient to catalyze the hydrogen evolution reaction (HER) in aqueous media, and its performance is superior, in terms of both lower overpotentials and larger catalytic currents, to covalent porphyrin frameworks using non-fluorinated cobalt porphyrin analogues and also monomeric fluorinated cobalt porphyrins simply adsorbed on CNTs. This work combines the merits of CNT-templated covalent frameworks and fluorinated cobalt porphyrins to significantly improve the HER performance. This strategy is valuable to be explored in other electrocatalytic systems using molecule-engineered carbon materials.