Gas storage in a safe and economical way is an important aspect of modern life. This study reports on the behavior of the zeolite potassium chabazite (Si/Al = 2.2) as a nanocontainer to store N2 and CH4 by a “temperature” controlled nanovalve. We reveal the effect of extra-framework cation type and density on the adsorption characteristics by measuring a series of isotherms. Temperature programmed desorption (TPD) experiments are conducted to identify the working temperature for gas storage. The results show a N2 storage capacity of 3.02 mmol/g if loaded above 266 K and 5 MPa and held below 223 K and at atmospheric pressure. For CH4 storage, a more mild working temperature (i.e., above 279 K) is observed due to its larger molecular size than that of N2. Chabazite is a promising gas storage container because its features can be tailored to encapsulate a series of gases of different size by tuning its extra-framework cation type and density.