The photocatalytic performance of graphitic phase carbon nitride (g-C3N4) is strongly influenced by its own microstructure as well as the precursor structure that causes the microstructure changes. In this paper, a composite precursor of sodium chloride and cyanamide (NaCl/CA-2) was obtained by freeze-drying, which possess an aggregated state different from that of the non-freeze-drying method. This new aggregation state with the introduction of sodium ions into the cyanamide lattice results in a higher activation energy of NaCl/CA-2 in the thermal polycondensation process of the molten salt-assisted preparation of g-C3N4, which prevented the condensation of two cyanamides to one dicyandiamide, ultimately obtaining FD-CN with an amino-rich structure. The nitrogen atoms on the amino group can provide the photocatalyst with more unpaired electrons that can participate in the photoexcitation process, further improving its electron-hole separation ability and charge transfer efficiency, thus effectively enhancing its photocatalytic activity. Compared to the original g-C3N4, the photocatalytic activity of FD-CN for the degradation of methylene blue increased 2.19 times.