Grain boundaries (GBs) are inevitable for the solution-processed perovskite polycrystalline films, but they become the weakest regions when the film undergoes degradation, especially unreacted PbI2 prefers to locate at GBs. Herein, this issue is solved by applying hydroxyl functionalized ionic liquids (ILs) on perovskite solar cells (PSCs). The ILs sew up the GBs continuously through in situ formation of a plumbite complex with residual PbI2. By sewing-up the GBs, the PSCs afford a notable increase in both power conversion efficiency (PCE, from 21.49% to ∼24.00%) and device stability (remaining over 80% of the initial PCE after 600 h at 60 ℃, 90% of the initial PCE after 2000 h in a constant humidity environment of 40% RH, and 85% of its PCE under continuously light illumination for 700 h). These improvements are ascribed to the precise passivation of related defects, optimization of interfacial energy level, suppression of the charge recombination, and enhancement of charge collection through sewing-up the GBs. This “sewing-up grain boundaries” method is highly promising toward construction of robust films for solution-process PSCs.