Dopant-free hole-transporting layers (HTLs) are highly desired for realizing efficient and stable perovskite solar cells (PVSCs), but only very few of them can enable power conversion efficiencies (PCEs) over 20%. Herein, two imide-functionalized triarylamine-based donor-acceptor (D-A) type copolymers, PBTI-TPA and PTTI-TPA, are developed and applied as dopantfree HTLs in inverted PVSCs. The combination of a classic redox-active triphenylamine donor unit and an electron-withdrawing oligothiophene imide co-unit with rigid and planar backbone furnishes the two polymers with quasi-planar backbone, suitable frontier molecular orbital (FMO) energy levels, favorable thermal stability, appropriate film morphology, and passivation effect. More importantly, the greatly improved hole mobility renders them as promising HTLs for PVSCs. As a result, the undoped PTTI-TPA-based inverted PVSCs deliver a remarkable PCE up to 21% as well as negligible hysteresis and substantial long-term stability, outperforming the devices based on PBTI-TPA and PTAA. The performance also represents one of the highest PCEs reported to date for PVSCs based on dopant-free polymeric HTLs. The results highlight the great potentials of oligothiophene imides for constructing donor-acceptor polymeric HTLs for enabling highperformance dopant-free PVSCs.