Poly(triazine imide) was synthesized with incorporation of Li+ and Cl− ions (PTI/Li+Cl−) to form a carbon nitride derivative. The synthesis of this material by the temperature-induced condensation of dicyandiamide was examined both in a eutectic mixture of LiCl–KCl and without KCl. On the basis of X-ray diffraction measurements of the synthesized materials, we suggest that a stoichiometric amount of LiCl is necessary to obtain the PTI/Li+Cl− phase without requiring the presence of KCl at 873 K. PTI/Li+Cl− with modification by either Pt or CoOx as cocatalyst photocatalytically produced H2 or O2, respectively, from water. The production of H2 or O2 from water indicates that the valence and conduction bands of PTI/Li+Cl− were properly located to achieve overall water splitting. The treatment of PTI/Li+Cl− with [Pt(NH3)4]2+ cations enabled the deposition of Pt through ion exchange, demonstrating photocatalytic activity for H2 evolution, while treatment with [PtCl6]2− anions resulted in no Pt deposition. This was most likely because of the preferential exchange between Li+ ions and [Pt(NH3)4]2+ cations.