Abstract: In QCD, while the phase in the quark masses are physical through the axial anomaly, it must be extremely small to be consistent with the measurement of the electric dipole moment of the neutron. We review and discuss this mystery, called the strong CP problem, and present an approach from the lattice QCD. Especially, we discuss the temperature dependence of the topological property of QCD which has physical significance in the estimation of the QCD axion in the Universe.