Two-dimensional (2D) materials are promising components for defect passivation of metal halide perovskites. Unfortunately, commonly used polydisperse liquid-exfoliated 2D materials generally suffer from heterogeneous structures and properties while incorporated into perovskite films. We introduce monodisperse multifunctional 2D crystalline carbon nitride, poly(triazine imide) (PTI), as an effective defect passivation agent in perovskite films via typical solution processing. Incorporation of PTI into perovskite film can be readily attained by simple solution mixing of PTI dispersions with perovskite precursor solutions, resulting in the highly selective distribution of PTI localized at the defective crystal grain boundaries and layer interfaces in the functional perovskite layer. Several chemical, optical, and electronic characterizations, in conjunction with density functional theory calculations, reveal multiple beneficial roles from PTI: passivation of undercoordinated organic cations at the surface of perovskite crystal, suppression of ion migration by blocking diffusion channels, and prevention of hole quenching at perovskite/SnO2 interfaces. Consequently, a noticeably improved power conversion efficiency is achieved in perovskite solar cells, accompanied with promoted stability under humid air and thermal stress. Our strategy highlights the potential of judiciously designed 2D materials as a simple-to-implement material for various optoelectronic devices, including solar cells, based on hybrid perovskites.