In this study, N and P were used to double doping MXene to obtain N,P-MXene with increased layer spacing and structural defects. Schottky junction N,P-MXene/ZnIn2S4 photocatalysts with tight interfacial contacts were obtained by in situ growth of flower-like ZnIn2S4 nanosheets. The N,P-MXene interlayer spatial structure facilitates the uniform dispersion of ZnIn2S4 and the exposure of the active site. The formation of the Schottky barrier enables the two closely contacted interfaces to form a carrier transport channel, which accelerates the arrival of the charge carriers on the catalyst surface for REDOX reactions. 50N,P-MXene/ZIS degraded 86.1% of CIP and 93.9% of MO. In addition, after several cycling experiments, it was proved that the photocatalyst had good structure and chemical stability. The photocatalytic mechanism was demonstrated by UPS and radical quenching experiments. N,P-MXene/ZnIn2S4 is not only suitable for pH=7-11, but also for salt solution wastewater containing higher concentrations of NaCl or KCl. Therefore, the construction of heteroatom doped N,P-MXene/ZnIn2S4 Schottky junction photocatalysts with excellent photocatalytic degradation performance is of profound significance for the treatment of pollutants.