Synthesis, structure determination, and magnetic properties are reported for the metastable and crystal-chemically isotypic phases cobalt carbodiimide, CoNCN, and nickel carbodiimide, NiNCN, adopting the hexagonal system and space group P63/mmc (NiAs type) with interatomic distances of Co-N = 2.17 Angstrom and Ni-N = 2.12 Angstrom and an octahedral coordination of the transition-metal ions; the NCN(2-) units reveal the carbodiimide shape with two C=N double bonds. The low-susceptibility data go back to strong antiferromagnetic spin-spin coupling, similar to the behavior of the electronically related oxides CoO and NiO.