The first-principles full-potential linearized augmented plane-wave method within density-functional theory is used to investigate electronic structure and magnetism of wurtzite (WZ) crystal structure MC (M=Ca,Sr,Ba and Mg). It is shown that the WZ CaC, SrC and BaC are half-metallic ferromagnets with a magnetic moment of 2μB per formula unit, whereas MgC shows the metallic character. The half-metallicity is also found to be robust with respect to the lattice compression and is maintained up to the lattice constant contraction of 12%, 21%, and 8% for WZ CaC, SrC and BaC, respectively. The large HM gaps (0.54–0.81 eV) and robustness of half-metallicity with respect to the lattice change make these materials possible candidates for spin injection in spintronic devices.