The high‐quality perovskite film with few defects plays an important role in the power conversion efficiency (PCE) and long‐term stability of perovskite solar cells. Here, an efficient strategy is proposed to eliminate Pb0 and passivate Pb2+ simultaneously by employing a stable polyoxometalate‐based material CoW12@MIL‐101(Cr) in the precursor solution of perovskite. The controllable oxidation ability of CoW12 is optimized through the interaction with metal–organic frameworks, resulting in a doped perovskite film with regular morphology, large grain size, and low defects density. The solvent effects and formation of intermediate materials in the precursor solution are further investigated by an in situ thermogravimetry‐Fourier transform infrared spectroscopy analysis. In addition, the champion doped‐device showed enhanced PCE to 21.39% and excellent stability, maintaining 85% and 89% of the original PCE after heating at 85 °C in N2 atmosphere and stored in ambient conditions (25 °C, 40% humidity) for 1000 h, respectively.