The study of the diffusion and separation performance of small molecules within polyimide membranes under uniaxial stress is crucial for their applications under high-temperature and high-pressure conditions. In this study, we systematically investigated the diffusion behavior and diffusion selectivity of N2, CF4, C2F6, SF6, C2H4, C2H6, CH4, and SO2 gases, as well as their gas mixtures, within polyimide membranes under different tensile temperatures (300 K, 400 K, 500 K, 600 K) and tensile rates (1011 s−1, 1010 s−1, 109 s−1, 108 s−1) using molecular dynamics simulations. Our findings indicate that the diffusion coefficients of gas molecules within the polymer membrane increase with increasing strain or temperature. Excessive or overly rapid tensile rates are not favorable for the most efficient diffusion of molecules within the membrane. The strain has a relatively small impact on the diffusion coefficients of gas molecules that strongly adsorb to the polymer membrane. In contrast, the differences in the kinetic diameters of gas molecules affect diffusion selectivity under varying strain. These results suggest that a combination of molecular kinetic diameter, gas-polymer interactions, internal free volume, and pore distribution influences the effective gas diffusion within polyimide membranes. By controlling strain appropriately, the diffusion separation performance of this membrane material can be effectively improved.