Using first-principles density functional theory based on the full potential linearized augmented plane wave method and the local spin density approximation (LSDA), the geometric structures of pure LiMgN, Cu-doped LiMgN, and Cu-doped LiMgN with either excess Li or Li deficiency are optimized, and their electronic structures, half-metallic properties, formation energies and optical properties are calculated. The results indicate that Cu doping makes the Cu3d states hybridize with the Li2s and N2p states simultaneously, and this leads to sp-d orbital hybridization. The resulting system produces spin polarization impurity bands, displays half-metallic behavior and has a net magnetic moment. Li(Mg 0.9375 Cu 0.0625 )N is still a direct band gap semiconductor like LiMgN. The bottom of its conduction band and the top of its valance band are both at the G point in the Brillouin zone. The band gap of the material is 2.41 eV, which is slightly narrower than the value of 2.47 eV for LiMgN. There are a total of six impurity bands in the band gap. Three of these bands are in the spin-up band, and the other three are in the spin-down band. In the spin-down band, the Fermi level goes through the impurity bands, and thus the material shows half-metallic properties. The half-metallic energy gap is 0.09 eV. The strong sp-d orbital hybridization causes the energy level to split, and the t2g energy level of the Cu3d state electrons in the spin-down band is pushed above the Fermi level, which leads to half-filled states. The number of spin-up electrons is slightly more than that of the spin-down electrons, and the Li(Mg 0.9375 Cu 0.0625 )N system has a 1.04 μ в net magnetic moment. The properties of the Li-deficient or Li-excess systems are affected by the stoichiometric number of Li in each case. In the Li-deficient compounds, the Li vacancies strengthen the sp-d orbital hybridization, and make the impurity band width, the half-metallic properties, the net magnetic moment, and the Curie temperature increase, while the formation energy decreases from 2.23 to 1.50 eV. In contrast, the half-metallic behavior of the Li-excess Cu-doped LiMgN vanishes, and the system becomes an indirect band gap semiconductor, although its band gap narrows to 2.13 eV, and its conductive properties become stronger. These results show that the LiMgN semiconductor is a realistic candidate diluted magnetic semiconductor material with decoupled charge and spin doping, in which the charge and the spin can be injected separately via Li off-stoichiometry and Cu isovalent doping. The calculated dielectric function indicates that these Cu-doped systems have a new dielectric peak in the low-energy region. The Li deficiency enhances both the dielectric peak and the absorption of low-frequency electromagnetic waves, while there is an obvious change in the complex refractive index function.