Diazotization of p-aminobenzonitrile and coupling of the resulting diazonium salt with N,N-dimethylethylenediamine affords a novel material that has been shown by X-ray crystallography to be a cocrystal (3) of the pentaazadiene (1) and the diaryltriazene (2). Crystal data: monoclinic, space group P21/c, a = 9.363(5), b = 21.509(3), c = 15.862(5) Å, β = 98.86(5)°, V = 3156.3(18) Å3, Z = 4, R w = 0.035, R int = 0.037. The pairing of the two molecules 1 and 2 appears to represent a unique molecular recognition event involving a combination of hydrogen bonding and π–π stacking. The crystal structure shows that the N–H of the triazene is within hydrogen-bonding distance of the tertiary nitrogen atom in the alkyl side-chain of the pentazadiene; furthermore, the benzene rings of the triazene and the pentazadiene are stacked off-register and separated by 3.53 Å. The formation of the components of the cocrystal is rationalised in terms of the formation and decomposition of the 1-aryl-3-alkyltriazene, Ar–N=N–NH–CH2CH2NH2.