In the title compound, C16H11Cl2N3O, the 4-methoxy-substituted benzene ring makes a dihedral angle of 41.86 (9)° with the benzene ring of the benzonitrile group. In the crystal, molecules are linked into layers parallel to (020) by C--H···O contacts and face-to-face π-π stacking interactions [centroid-centroid distances = 3.9116 (14) and 3.9118 (14)Å] between symmetry-related aromatic rings along the a-axis direction. A Hirshfeld surface analysis indicates that the most important contributions to the crystal packing are from Cl···H/H···Cl (22.8%), H···H (21.4%), N···H/H···N (16.1%), C···H/H···C (14.7%) and C···C (9.1%) interactions. [ABSTRACT FROM AUTHOR]