Titanium and niobium carbides have been synthesized through self-propagating high-temperature reaction by mechanically alloying the elemental powder mixtures. It is found that this reaction is very similar to the conventional self-propagating high-temperature synthesis (SHS) process, but the ignition of the reaction is identified to be the mechanical collisions instead of heating the materials. Analysis of the products reveals that the final products of the Ti-C system are in good agreement with the equilibrium phase diagram, showing less relation with the alloying process. The decrease of the C content shortens the milling time prior to the SHS reaction of TiC by promoting the intimate mixing of the components, but lowers the heat release of the reaction and makes the propagation of the reaction more slowly. The SHS reaction during the mechanical alloying of the Nb-C system shows little difference, but the decrease of the C content can hardly influence the milling time prior to the reaction. By lowering the heat release of the SHS reaction of NbC, it lowers the reaction propagating rate. Mechanical alloying Nb50C50and Nb55C45results in the formation of NbC, while mechanical alloying Nb60C40results in NbC + Nb instead of NbC + Nb2C according to the phase diagram. It was attributed to the fact that the rapid SHS reaction favors the formation of NbC, but hinders the occurrence of Nb2C phase through slow diffusion between NbC and the residual Nb. The measurement of the lattice parameters of TiC and NbC for different composition affirms the observed results. The particle sizes of obtained TiC and NbC are very fine at around or even less than 1 μm.