In the title 3-cyanopyridine derivative, C21H19N3O4, the 3-cyano-substituted pyridine ring forms dihedral angles of 2.35 (5) and 41.60 (5)° with the unsubstituted pyridine and 2,4,5-trimethoxy-substituted benzene rings, respectively. The dihedral angle between the unsubstituted pyridine and benzene rings is 39.84 (5)°. The methoxy groups form Cmethyl—O—C—(C,N) torsion angles in the range 0.80 (15)–11.45 (15)°. In the crystal, molecules related by 21 screw axes are linked by weak C—H⋯N hydrogen bonds along [010]. In addition, weak C—H⋯π interactions and π–π stacking interactions between pyridine rings, with a centroid–centroid distance of 3.6448 (6) Å, are observed.