Polyimides are interesting polymer materials for organic solvent nanofiltration (OSN) applications because of their high excess free volume and high chemical and temperature resistance. However, an open challenge that remains for glassy polymer materials (i.e., polyimides) is their tendency to swell in organic solvents which can lead to a loss of performance. An understanding on how swelling influences the polymer properties and performance is then of crucial importance for assessing polyimide suitability in OSN applications. Here, the combination of in situ spectroscopic ellipsometry (iSE), broadband dielectric spectroscopy (BDS), and diffuse reflectance Fourier transform infrared spectroscopy (DRIFT-FTIR) is applied to study the molecular interaction of two organic penetrants, toluene and n-hexane, with Matrimid 5218 in detail. iSE shows that slightly cross-linked Matrimid 5218 swells approximately seven times more in toluene (swelling degree ≈ 28%) compared to in n-hexane (swelling degree ≈ 4%). Combined BDS and DRIFT-FTIR results indicate that toluene interacts with the benzene ring present in the diamine via π-πinteractions, while n-hexane likely fills up the excess free volume and interacts via local van der Waals interactions. This work highlights the insights into the exact nature of the molecular interactions between the penetrant and polymer that can be gained from a combination of BDS and other techniques and how these insights can be used to estimate or understand solvent-induced swelling of polymers used in OSN applications.