Lattice thermal conductivity ( κ lat ) of MgSiO 3 perovskite and post-perovskite is an important parameter for the thermal dynamics in the Earth. Here, we develop a deep potential of density functional theory quality under entire thermodynamic conditions in the lower mantle, and calculate the κ lat by the Green–Kubo relation. Deep potential molecular dynamics captures full-order anharmonicity and considers ill-defined phonons in low- κ lat materials ignored in the phonon gas model. The κ lat shows negative temperature dependence and positive linear pressure dependence. Interestingly, the κ lat undergos an increase at the phase boundary from perovskite to post-perovskite. We demonstrate that, along the geotherm, the κ lat increases by 18.2% at the phase boundary. Our results would be helpful for evaluating Earth’s thermal dynamics and improving the Earth model.