The highest certification efficiency of perovskite solar cells (PSCs) has reached 26.7 %. However, the high defect density on the surface of perovskite films prepared by low temperature solution method and the energy mismatch between the carrier transport layers and perovskite layer (PVK) greatly limit the performance improvement of PSCs. The introduction of passivating agent to modify the perovskite interface and grain boundary can reduce the defect density, coordinate the energy level effectively, and improve the efficiency and stability of devices. A Lewis base molecule 5-amino-1,3,4-thiadiazole-2-thiol (AMTD) with multiple active sites is introduced at the interface between PVK and hole transport layer (HTL). The electron-rich groups, such as = S, –S–, –NH2, –N on AMTD, passivate the positive electrical defects on the interface and grain boundary, and increase carrier transport efficiency. The interfacial energy level array is optimized to achieve more efficient charge transportation. In addition, the modified of AMTD has a significant protective effect on the perovskite, which inhibit the moisture erosion of in environment. Consequently, the AMTD-optimized device achieves a power conversion efficiency (PCE) of 24.13 %, compared to the efficiency of 21.62 % for pristine device. The stability of the devices is improved greatly.