We present an in situ small- and wide-angle X-ray scattering (SAXS/WAXS) and quick-scanning extended X-ray absorption fine-structure (QEXAFS) spectroscopy study on the crystallization of the metal–organic framework ZIF-7. In combination with DFT calculations, the self-assembly and growth of ZIF-7 microrods together with the chemical function of the crystal growth modulator (diethylamine) are revealed at all relevant length scales, from the atomic to the full crystal size.