  We report the first detection in the interstellar medium of
$N$-cyanomethanimine (H$_2$CNCN), the stable dimer of HCN of highest energy,
and the most complex organic molecule identified in space containing the
prebiotically relevant NCN backbone. We have identified a plethora of $a$-type
rotational transitions with 3 $\leq J_\text{up} \leq$ 11 and $K_\text{a} \leq$
2 that belong to this species towards the Galactic Center G+0.693-0.027
molecular cloud, the only interstellar source showing the three
cyanomethanimine isomers (including the $Z$- and $E$- isomers of
$C$-cyanomethanimine, HNCHCN). We have derived a total column density for
H$_2$CNCN of (2.9$\, \pm \,$0.1)$\times$10$^{12}$ cm$^{-2}$, which translates
into a total molecular abundance with respect to H$_2$ of (2.1$\, \pm
\,$0.3)$\times$10$^{-11}$. We have also revisited the previous detection of
$E$- and $Z$-HNCHCN, and found a total $C/N$-cyanomethanimine abundance ratio
of 31.8$\, \pm \,$1.8 and a $Z/E$-HNCHCN ratio of 4.5$\, \pm \,$0.2. While the
latter can be explained on the basis of thermodynamic equilibrium, chemical
kinetics are more likely responsible for the observed $C/N$-cyanomethanimine
abundance ratio, where the gas-phase reaction between methanimine (CH$_2$NH)
and the cyanogen radical (CN) arises as the primary formation route.
