The band structure, electronic, magnetic, and optical properties of g-SiC monolayers doped with alkaline earth metals (Be, Mg, Ca, Sr, and Ba) are calculated by means of first principles based on density functional theory. Although the intrinsic g-SiC monolayer is nonmagnetic, it shows magnetic properties after doping with alkaline earth metals. The magnetic moments are, in the order of the above-named dopants, 1.583 μ B, 1817 μ B, 2.000 μ B, 2.000 μ B, and 2.000 μ B. Charge transfer and the net spin charge occur mainly between the dopant atom and surrounding C atoms. The results show that the conductivity of g-SiC can be greatly improved by doping with alkaline earth metals, a technique that can be applied to the field of semiconductor spintronics. High absorption peaks in the ultraviolet indicate that the material has potential applications in UV optoelectronic devices.