Summary Covalent organic frameworks (COFs) have emerged as a new class of molecularly precise, porous functional materials characterized by broad structural and chemical versatility, with a diverse range of applications. Despite their increasing popularity, fundamental aspects of COF formation are poorly understood, lacking profound experimental insights into their assembly. Here, we use a combination of in situ X-ray powder diffraction and Raman spectroscopy to elucidate the reaction mechanism of mechanochemical synthesis of imine COFs, leading to the observation of key reaction intermediates that offer direct experimental evidence of framework templating through liquid additives. Moreover, the solid-state catalyst scandium triflate is instrumental in directing the reaction kinetics and mechanism, yielding COFs with crystallinity and porosity on par with solvothermal products. This work provides the first experimental evidence of solvent-based COF templating and is a significant advancement in mechanistic understanding of mechanochemistry as a green route for COF synthesis.