In this study possible routes from dissolved M and C atoms to a M-C (M = Ti, Nb) cluster are studied. Using atomistic modelling to perform relaxation simulations and molecular dynamics (MD) simulations for the Fe-M-C ternary system, the formation of clusters is studied for M. Additionally the stability of M-C clusters is assessed. The clustering of M and C atoms as observed in experiments is also found in simulations. The initial clusters found in this work have a (Fe,M)C composition with a large Fe fraction. Moreover, structurally relaxed clusters reveal that there are growth pathways with a monotone decrease in Gibbs energy, suggesting that the highest energy barrier in the formation of M-C clusters is the diffusion barrier for the atoms forming the cluster. The development of M-C clusters as found in this study suggests a formation mechanism for nano-precipitation of carbides consisting of several steps; first a C cluster forms, then M atoms attach to the C cluster forming a (Fe,M)C cluster, and in the final step the (Fe,M)C cluster transforms to a NaCl-structured carbide.