The sol-gel synthesis of iron carbide (Fe3C) nanoparticles proceeds through multiple intermediate crystalline phases, including iron oxide (FeO x ) and iron nitride (Fe3N). The control of particle size is challenging, and most methods produce polydisperse Fe3C nanoparticles of 20-100 nm in diameter. Given the wide range of applications of Fe3C nanoparticles, it is essential that we understand the evolution of the system during the synthesis. Here, we report an in situ synchrotron total scattering study of the formation of Fe3C from gelatin and iron nitrate sol-gel precursors. A pair distribution function analysis reveals a dramatic increase in local ordering between 300 and 350 °C, indicating rapid nucleation and growth of iron oxide nanoparticles. The oxide intermediate remains stable until the emergence of Fe3N at 600 °C. Structural refinement of the high-temperature data revealed local distortion of the NFe6 octahedra, resulting in a change in the twist angle suggestive of a carbonitride intermediate. This work demonstrates the importance of intermediate phases in controlling the particle size of a sol-gel product. It is also, to the best of our knowledge, the first example of in situ total scattering analysis of a sol-gel system.