X-ray crystallography is the method of choice for the direct structural analysis of crystalline compounds1. Extending its use to the in situ mapping of chemical transformations could provide valuable insights, as illustrated by time-resolved X-ray crystallography studies2, 3; however, the transient nature of unstable reaction intermediates often poses a significant challenge. It has recently been demonstrated that standard chemical reactions can occur within the pores of porous coordination networks4, 5, 6 and that the robust crystallinity of these networks facilitates in situ X-ray analysis of the adducts and products7, 8, 9, 10, 11. Here we show that such systems even enable X-ray observations of reaction intermediates that are usually transient and non-isolable. Our proof-of-concept demonstration examines the simple and ubiquitous reaction between an amine and an aldehyde, which normally form a very short-lived hemiaminal that then yields the Schiff-base product. The mechanism of this reaction has been exhaustively examined, but the hemiaminal intermediate has only rarely been observed12, 13, 14, 15, 16. We first determine the structure of a porous network with an aromatic amine embedded in it, then diffuse an aldehyde substrate into the material to transform the amine into a hemiaminal intermediate that is kinetically trapped and thus amenable to X-ray analysis, and finally raise the temperature of the system to obtain the imine product and determine its structure. These results establish that porous network materials provide a means of obtaining sequential X-ray-based snapshots of the structural transformations that occur during chemical reactions.