a b s t r a c tThe first-principles calculations were performed based on density functional theory to study the structural, electronic and magnetic properties of Ni 4 C resulting from carbon atom diffusion in a conventional Ni unit cell. Firstly, geometry optimization was performed to reach the equilibrium state of Ni 4 C. The lattice constant of the stable Ni 4 C crystal structure was larger than that of the Ni unit cell. Then the electronic and magnetic properties of Ni 4 C were determined, and the results showed that the magnetic moment was 0.46 m B per unit cell, and the calculated local magnetic moment of carbon atoms was 0. There were two occupied sites for Ni atoms with different local magnetic moments, which was about 0.64 m B (close to that of nickel unit cell) for Ni a atoms at the top corners and a negative value of À0.06 m B for Ni b atoms at the face center. The magnetic moment increased abruptly to 1.89 m B at 3.79 Å due to the changes of lattice parameters with external factors, and fluctuated slowly from 3.5 Å to 3.78 Å.