Abstract: In situ grazing incidence small-angle X-ray scattering analysis was successfully performed during the thermal processing of film blends of polymethylsilsesquioxane (PMSSQ) precursor and triethoxysilyl-terminated six-arm poly(-caprolactone) (mPCL6) porogen. In addition, thermogravimetric analysis of the films was carried out in a nitrogen atmosphere. These measurements provide important information about the structures of the blend films and of the resulting porous films. In particular, they are used in this paper to establish the mechanism of the formation of imprinted pores within the blend films. During the heating run, the sacrificial thermal degradation of the porogen component commenced at 320 °C, generating pores in the resulting cured PMSSQ films. Only very limited porogen aggregation occurred during the blend film formation process (spin-coating and subsequent drying), and these porogen aggregates were of relatively small size and narrow size distribution. The observed restriction of the formation of such porogen aggregates was found to result from the favorable hybridization reaction of the porogen's reactive end groups with the reactive functional groups of the PMSSQ precursor, which competes with aggregation via reaction between the porogen molecules. The average radius (or half-size) of the porogen aggregates was in the range 2.45-3.98 nm, depending on the porogen loading (10-40 wt %). The porogen aggregates retained their size and size distribution until thermal degradation, which resulted in the imprinting of nanopores in the cured PMSSQ films with size and size distribution corresponding to those of the porogen aggregates. The porosities of the resulting nanoporous films were in the range 12.4-41.7%, depending on the initial porogen loading.