The title structure, C9H11N3O2, is a racemate. The chiral centre is situated at the N—C—N C atom of the imidazolidine ring. The interplanar angle between the mean planes of the pyridine and imidazolidine rings is 89.41 (5)°. The methyl group is in a trans position with respect to the pyridine N atom. In the crystal, the molecules are arranged in zigzag layers parallel to the b axis. The molecules within the layers are interconnected by strong O—H⋯N and weak N—H⋯O hydrogen bonds; the former take place between OH groups and amine N atoms and the latter between the amine N atom and the carbonyl O atom. In addition, C—H⋯O interactions are also present.