The unavoidably positively and negatively charged defects at the interface between perovskite and electron transport layer (ETL) often lead to severe surface recombination and unfavorable energy level alignment in inverted perovskite solar cells (PerSCs). Inserting interlayers at this interface is an effective approach to eliminate charged defects. Herein, the macrocyclic molecule valinomycin (VM) with multiple active sites of ─C═O, ─NH, and ─O─ is employed as an interlayer at the perovskite/ETL contact to simultaneously eliminate positively and negatively charged defects. Combined with a series of theoretical calculations and experimental analyzes, it is demonstrated that the ─C═O and ─O─ groups in VM can immobilize the uncoordinated Pb2+ to manage the positively charged defect and the formation of N─H···I hydrogen bonding can recompense the formamidine vacancies to eliminate the negatively charged defect. In addition, the VM interlayer induces a favorable downshift band bending at the perovskite/ETL interface, facilitating charge separation and boosting charge transfer. Thanks to the reduced charged defects and favorable energy level alignment, the fabricated inverted PerSC delivers an outstanding power conversion efficiency of 24.06% with excellent long-term ambient and thermal stability. This work demonstrates that managing charged defects via multiple functional groups and simultaneously regulating energy level alignment is a reliable strategy to boost the performance of PerSCs.