This paper designed a mode-locked Yb-doped fiber laser based on a one-dimensional photonic crystal(1D-PhC) containing a defect layer. First-principles calculations were performed for the black phosphorus (BP) defect layer, and its refractive index and extinction coefficient curves were obtained. Further, a 1D-PhC with a 7-layer periodic structure was designed as the saturable absorber (SA) of the mode-locked fiber laser. A single layer of BP was used as the defect layer of the photonic crystal. Based on the numerical simulation of the structure by the finite element simulation software Comsol, the results show that the system can achieve an optical modulation depth of 38.6% at the center wavelength of 1064 nm, which is much higher than the modulation depth of 2.8% of the conventional single-layer black phosphorus. The 1D-PhC with defect layer was applied to a linear cavity Yb-doped fiber laser, and simulations were performed. The simulation results showed that the saturable absorber of the BP-based 1D-PhC with considerable modulation depth could achieve stable mode-locked pulse output at low power. In contrast, the conventional BP cannot achieve mode-locked pulse output at low power due to low modulation depth and high mode-locking threshold.