The molecule of the title compound, C15H15N3O3, is twisted, with the dihedral angle between the pyridyl and benzene rings being 58.34 (6)°. In the crystal, amide-N—H...O(amide) and imine-C—H...O(amide) hydrogen bonds lead to zigzag (glide symmetry) chains extending along the c axis which are joined into layers parallel to the [100] direction by offset π–π stacking interactions between inversion-related benzene rings [centroid–centroid distance = 3.7468 (7) Å] and by C—H...π(pyridyl) interactions. Pyridyl rings protrude from the surfaces of the layers and partially intercalate with those of adjacent layers.