Nitrogen (N2) rejection from methane (CH4) is the most challenging step in natural gas processing because of the close similarity of their physical-chemical properties. For decades, efforts to find a functioning material that can selectively discriminate N2 had little outcome. Here, we report a molecular trapdoor zeolite K-ZSM-25 that has the largest unit cell among all zeolites, with the ability to capture N2 in favor of CH4 with a selectivity as high as 34. This zeolite was found to show a temperature-regulated gas adsorption wherein gas molecules' accessibility to the internal pores of the crystal is determined by the effect of the gas-cation interaction on the thermal oscillation of the "door-keeping"cation. N2 and CH4 molecules were differentiated by different admission-trigger temperatures. A mild working temperature range of 240-300 K was determined wherein N2 gas molecules were able to access the internal pores of K-ZSM-25 while CH4 was rejected. As confirmed by experimental, molecular dynamic, and ab initio density functional theory studies, the outstanding N2/CH4 selectivity is achieved within a specific temperature range where the thermal oscillation of door-blocking K+ provides enough space only for the relatively smaller molecule (N2) to diffuse into and through the zeolite supercages. Such temperature-regulated adsorption of the K-ZSM-25 trapdoor zeolite opens up a new approach for rejecting N2 from CH4 in the gas industry without deploying energy-intensive cryogenic distillation around 100 K.