In the title compound, C21H20N4O2, the statistically planar 1H-limidazole ring [maximum deviation = 0.003 (1) Å] makes dihedral angles of 1.33 (9) and 8.23 (7)°, respectively, with the essentially planar fused pyridine ring [maximum devation = 0.018 (1) Å] and the pendant benzene ring, which is attached to the pyridine ring by an —NH— group. An intramolecular C—H⋯N interaction, which generates an S(6) ring, helps to estalish the molecular conformation. In the crystal, the molecules are linked by N—H⋯O, C—H⋯O and O—H—N hydrogen bonds, which generate bifurcated R
1
2(6) and R
2
2(9) ring motifs, resulting in supramolecular [001] chains. The crystal structure also features weak π–π stacking [centroid–centroid distance = 3.5943 (9) Å] and C—H⋯π interactions.