The poor and limited-functional NiOx/perovskite buried interface has hindered the development of NiOx-based perovskite solar cells (PSCs). Herein, a π-conjugated liquid-crystalline organic spacer with aggregation-induced emission (AIE), (Z)-2-([1,1′-biphenyl]-4-yl)-3-(4-(3-aminopropoxy)phenyl)acrylonitrile (BPCSA), is employed for the multi-functional NiOx/perovskite buried interface engineering. The functional groups of BPCSA spacer can coordinate with NiOx and induce the in-situ formation of 2D perovskite at the NiOx/perovskite interface. The in-situ-formed 2D perovskite interlayer can passivate interface defects, strengthen interface interconnection and optimize energy level alignment between NiOx and 3D perovskites. More markedly, the π-conjugated liquid-crystalline molecular structure and AIE property of BPCSA spacer can guide the high-quality crystal growth of upper 3D perovskite films, release interfacial strain, facilitate interfacial carrier transport and realize efficient photosensitization process concurrently. Consequently, such 3D/2D PSCs can acquire a champion power conversion efficiency (PCE) of 23.45% with improved stability. Besides, high-performance flexible 3D/2D PSCs are also successfully demonstrated.