Introducing suitable electron/hole transport layers and transparent conductive layers (TCLs) into perovskite solar cells (PSCs) is key to enhancing the selective extraction of charge carriers and reducing surface recombination losses. Here, we introduce nanoporous gallium nitride (NP GaN)/n-type GaN (n-GaN) as a dual-function cathode structure for PSCs, acting as both the TCL and the electron transport layer (ETL). We demonstrate that the hierarchical NP GaN structure provides an expanded interfacial contact area with the perovskite absorber, while the n-GaN under the NP GaN displays high transmittance in the visible spectrum as well as higher lateral electric conductivity than that of a conventional ITO film. Prototype MAPbI3 PSCs based on this NP GaN/n-GaN cathode structure (without an extra ETL) show a power conversion efficiency of up to 18.79%. The NP GaN/n-GaN platform demonstrated herein paves the way for PSCs to take advantage of the widely available heterostructures of mature III-nitride-based technologies.