In the title compound, C16H15N5, the 1,4-dihydropyridine ring has a shallow boat conformation, while the 1,3-diazinane ring adopts an envelope conformation. In the crystal, pairwise N—H...N hydrogen bonds generate centrosymmetric dimers featuring R
2
2(12) motifs and C—H...N contacts connect these dimers to form double layers lying parallel to (001). Weak C—H...π and N—H...π interactions help to consolidate the double layers and van der Waals interactions occur between layers. A Hirshfeld surface analysis indicates that the most significant contributions to the crystal packing are from H...H (38.5%), N...H/H...N (33.3%) and C...H/H...C (27.3%) contacts.