Polymeric carbon nitride (PCN), in either triazine or heptazine form, has been regarded as a promising metal-free, environmentally benign, and sustainable photocatalyst for solar hydrogen production. However, PCN in most cases only exhibits moderate activity owing to its inherent properties, such as rapid charge carrier recombination. Herein we present a triazine-heptazine copolymer synthesized by simple post-calcination of PCN in eutectic salts, that is, NaCl/KCl, to modulate the polymerization process and optimize the structure. The construction of an internal triazine-heptazine donor-acceptor (D-A) heterostructure was affirmed to significantly accelerate interface charge transfer (CT) and thus boost the photocatalytic activity (AQY=60 % at 420 nm). This study highlights the construction of intermolecular D-A copolymers in NaCl/KCl molten salts with higher melting points but in the absence of lithium to modulate the chemical structure and properties of PCN.