In this paper, electromagnetic properties of the zigzag graphene nanoribbon (ZGNR) with a single-row line defect are studied by using the first-principles method based on the density functional theory. The energy band structures, transmission spectra, spin polarization charge densities, total energies, and Bloch states of the ZGNR are calculated when the line defect is located at different positions inside a ZGNR. It is shown that ZGNRs with and without a line defect at nonmagnetic and ferromagnetic states are metals, but the reasons for it to become different metals are different. At the antiferromagnetic state, the closer to the edge of ZGNR the line defect, the more obvious the influence on electromagnetic properties of ZGNR is. In the process of the defect moving from the symmetrical axis of ZGNR to the edge, the ZGNR has a phase transition from a semiconductor to a half metal, and then to a metal gradually. Although the ZGNR with a line defect close to the central line is a semiconductor, its band gap is smaller than the band gap of perfect ZGNR, owing to the new band introduced by the defects. When the line defect is located nearest to the boundary, the ZGNR is stablest. When the line defect is located next nearest to the boundary, the ZGNR is unstablest. When the line defect is located nearest or next nearest to boundary, the ground state of the ZGNR is a ferromagnetic state. However, if the line defect is located at the symmetric axis of ZGNR (M5) or nearest to the symmetric axis, the ground state would be an antiferromagnetic state. At the antiferromagnetic state, the phase transition of M5 from a semiconductor to a half metal can be achieved by applying an appropriate transverse electric field. Without a transverse electric field, M5 is a semiconductor, and the band structures of up-and down-spin states are both degenerate. With a transverse electric field, band structures of up-and down-spin states near the Fermi level are both split. When the electric field intensity is 2 V/nm, M5 is a half metal. These obtained results are of significance for developing electronic nanodevices based on graphene.