Cementite is the strengthening phase in pearlite, and its mechanical properties determine the strength of the pearlite. A crystal model of niobium-substituted Fe3C was constructed. The stability, charge density, and elastic constants of the model were calculated, and the effects of niobium (Nb) substitution on the properties of Fe3C were discussed. FeNb8d 2C is the most stable Nb-substituted structure. The reaction energy of FeNb8d 2C is -0.796 eV, with a magnetic moment of 0.07 μB/f.u. At the Fermi level, the DOS of FeNb8d 2C is 4.24, displaying metallic properties. Nb substitution enhances the symmetry of the DOS in Fe3C. The covalent bonding in FeNb8d 2C, predominantly consisting of σ and π bonds, is formed by the hybridization of Nb 3d states and C 2p states. FeNb8d 2C is mechanical stability. It exhibits the strongest resistance to linear compression along the [100] direction and the highest shear deformation resistance along the (010) plane. Nb substitution increases the toughness of Fe3C, enhances isotropy on the (010) plane, and improves the resistance to linear compression along the [010] direction.