The molecular conformation of the title compound, C20H15Cl2N3O2, is stabilized by an intramolecular O-H..O hydrogen bond, forming an S(6) ring motif. The central pyridine ring is almost planar [maximum deviation = 0.074 (3) Å]. It subtends dihedral angles of 86.10 (15) and 87.17 (14)°, respectively, with the phenyl and dichlorophenyl rings, which are at an angle of 21.28 (15)° to each other. The =C(-OH)CH3 group is coplanar. In the crystal, molecules are linked by intermolecular N-H..N and C-H..N hydrogen bonds, and N-H..π and C-H..π interactions, forming a three-dimensional network. The most important contributions to the crystal packing are from H..H (33.1%), C..H/H..C (22.5%), Cl..H/H..Cl (14.1%), O..H/H..O (11.9%) and N..H/H..N (9.7%) interactions. © 2021 International Union of Crystallography. All rights reserved.