In this work, we fabricate photodetectors made of methylammonium lead trihalide perovskite (MLHP) and phosphorus-doped graphitic carbon nitride nanosheets (PCN-S). Using thermal polymerization, PCN-S with a reduced band gap, are synthesized from low-cost precursors, making it feasible to form type-II bulk heterojunctions with perovskites. Owing to the bulk heterojunctions between PCN-S and MLHP, the dark current of the photodetectors significantly decreases from ∼10–9 A for perovskite-only devices to ∼10–11 A for heterojunction devices. As a result, not only does the on/off ratio of the hybrid devices increase from 103 to 105 but also the photodetectivity is enhanced by more than 1 order of magnitude (up to 1013 Jones) and the responsivity reaches a value of 14 A W–1. Moreover, the hybridization of MLHP with PCN-S significantly modifies the hydrophilicity and morphology of the perovskite films, which dramatically increases their stability under ambient conditions. The hybrid photodetectors, described here, present a promising new direction toward stable and efficient optoelectronic applications.