Lead halide perovskites hold great promise for photovoltaics and optoelectronics, yet ion migration continues to challenge their long-term stability. Here, combining first-principles calculations and machine learning molecular dynamics, we unravel the interplay between perovskite octahedral lattice dynamics and energy barrier associated with ion migration. Our results show that B-site substitution, particularly with alkaline-earth and lanthanide elements, notably strengthens lattice interactions, restrains octahedral oscillation, and increases iodine-migration barriers, outperforming the commonly used A-site and X-site substitutions and interstitial doping. Moreover, the enhanced barrier aligns with the geometric factor of μτ (tolerance-octahedral product), underlining the superior effectiveness of co- and multiple-element B-site doping in lattice stabilization and ion migration suppression. Experimental validation with exemplary hysteresis-free Eu-Ca-doped perovskite single crystals demonstrates remarkable improvements in ambient stability and transport properties. These findings highlight B-site engineering as an effective microstructural strategy for controlling ion migration, with important implications for stable and lead-reduced perovskite devices.