The electronic structures, magnetic and optical properties of Li1±y(Mg1−xCrx) P (x, y = 0.125) are calculated by using the first principles method based on density functional theory. We find that the incorporation of Cr causes the strong hybridization between Li-2s, P-2p, and Cr-3d orbitals, resulting in a spin-polarized impurity band and forming stronger Cr-P polar covalent bonds. Li(Mg0.875Cr0.125)P becomes half-metallic ferromagnetism. The properties of the doped systems can be regulated by Li off-stoichiometry. When Li is deficient, the narrower impurity band and stronger p-d orbital hybridization enhance the half-metallicity. While the half-metallicity disappears, the band gap becomes wider, and the conductivity decreases for Li excess system, but its magnetic moments increase. Comparing optical properties show that the imaginary part of dielectric and complex refractive index function and optical absorption spectrum all have a new peak in the low energy region after Cr doping, and the new peaks are significantly enhanced when Li is deficient. The absorption range of low frequency electromagnetic wave is enlarged, and the energy loss functions show obvious red-shift effect for the doped systems. The results indicate that the properties of Li(Mg,Cr)P can be controlled by Cr doping and Li off-stoichiometry independently, which will benefit potential spintronics applications.