Inorganic nanoparticles (NPs) are promising materials widely used in the transport layer of perovskite solar cells. However, the tendency of inorganic NPs to aggregate hinders their further application in preparing large-area films. The aggregation of inorganic NPs worsens the coffee ring effect, leading to the formation of inhomogeneous films. Consequently, the poor contact of bottom interface of the films affects the crystallization of the perovskite films, degrading the overall device performance. Herein, an electrically charged polymer, polyethyleneimine (PEI), was introduced into an inorganic NP solution. The charged nature of PEI significantly inhibited the aggregation of inorganic NPs. Moreover, the addition of PEI increased the viscosity of the inorganic NP solution, thereby reducing the coffee ring effect observed in the films. We achieved a power conversion efficiency of 23.2% based on a 1-cm2 normal perovskite solar cell (N-I-P device) with a SnO2 transport layer. The efficiency of the 1-cm2 inverted PSCs (P-I-N device) with a NiOx-based structure was improved to over 20%, demonstrating the universality of this strategy.