Nitride (N 3− ) or cyanamide (CN 2 2−) based mixedanion compounds stand as attractive materials due to their unique properties derived from the binary or multiple anions, although their synthesis remains challenging in incorporating the N 3− or CN 2 2− anions safely. This work highlights the first demonstration of in situ single phase formation of a LaCl(CN 2 ) mixed-anion compound from a stable single source precursor, melamine modified with LaCl 3 preparable under aqueous conditions. The in situ formation of LaCl(CN 2 ) involves the chemical modification of melamine with LaCl 3 to form a complex. Upon heating of the precursor under N 2 flowing, this complex generates cyanamide species around 400 °C, which react with LaCl 3 and nonsublimated melamine to afford a binary LaCl(CN 2 )/g-C 3 N 4 composite. Further pyrolysis at 800 °C decomposes the g-C 3 N 4 counterpart, resulting in the LaCl(CN 2 ) single-phase formation. The electronic properties of the precursor-derived single phase LaCl(CN 2 ) were studied by the density functional theory calculation and UV−vis spectroscopy combined with X-ray photoelectron spectroscopy analyses and characterized by measuring 4.7, 1.8, and −2.9 eV for the band gap energy, the valence band maximum, and the conduction band minimum relative to Fermi energy, respectively. This study paves the way for exploring various cyanamide-based mixed anion compounds, advancing their potential applications in various fields.