In situ composite methods have aroused research interest in materials science and acted as a novel strategy to achieve structural tailoring of materials. However, the controllable preparation of composites containing functional groups remains a challenge. Herein, we report an approach based on competitive coordination between structural analogues, by which the functionally composite metal complex (NiSH@Ni-FSA) was synthesized. The introduction of different functional groups allows precise control of the functionality of composites, ranging from NiSH@Ni-ClSA-D, NiSH@Ni-BrSA to NiSH@Ni-CF3SA. More interestingly, the synthesized material retained the microporous and mesoporous structure of the original complexes. The incorporation of hydrophobic functional groups effectively protects the electrode materials from degradation and corrosion. Meanwhile, the presence of intermolecular hydrogen bonding facilitates new composite nanomaterials with better performance for advanced energy storage applications.