Quasi-2D perovskites exhibit great potential in photodetectors due to their exceptional optoelectronic responsivity and stability, compared to their 3D counterparts. However, the defects are detrimental to the responsivity, response speed, and stability of perovskite photodetectors. Herein, an ultrafast photoexcitation-induced passivation technique is proposed to synergistically reduce the dimensionality at the surface and induce oxygen doping in the bulk, via tuning the photoexcitation intensity. At the optimal photoexcitation level, the excited electrons and holes generate stretching force on the Pb─I bonds at the interlayered [PbI6]-, resulting in low dimensional perovskite formation, and the absorptive oxygen is combined with I vacancies at the same time. These two induced processes synergistically boost the carrier transport and interface contact performance. The most outstanding device exhibits a fast response speed with rise/decay time of 201/627ns, with a peak responsivity/detectivity of 163 mA W-1/4.52 × 1010 Jones at 325nm and the enhanced cycling stability. This work suggests the possibility of a new passivation technique for high performance 2D perovskite optoelectronics.