All-inorganic (CsPbX3) perovskites by replacing the volatile organic components with cesium cations allow extending the long-term thermal stability of perovskite solar cells (PeSCs) vs their organic–inorganic hybrid counterparts. However, the stability of α-CsPbI3 and α-CsPbI2Br still remains to be improved. In this work, we incorporate redox-inactive samarium acetylacetonate [Sm(acac)3] into CsPbI2Br to fabricate CsPbI2Br perovskite thin films. It is evidenced that Sm3+ not only partially substitute the Pb2+ sites to yield slightly contracted perovskite lattice but also modulate the perovskite growth and passivate the NiOx/CsPbI2Br interface. As a result, CsPbI2Br PeSCs based on stoichiometric and optimal Sm(acac)3 doping (0.15 mol. %) of CsPbI2Br show excellent photovoltaic metrics with a champion power conversion efficiency (PCE) of 12.86%. Moreover, the CsPbI2Br PeSCs exhibit enhanced thermal stability upon incorporation of Sm(acac)3, which retains 90% of their original PCE under heating at 85 °C for 200 h.