Silk is the generic name given to the fibrous proteins spun by a number of arthropods. During metamorphosis, the larva of the silk producing arthropods excrete silk-fiber from its mouth and spun it around the body to form a protective structure called cocoon. An adult moth emerges out from the cocoon after the dormant phase (pupal phase) varying from 2 weeks to 9 months. It is intriguing how CO 2 /O 2 and ambient temperature are regulated inside the cocoon during the development of the pupa. Here we show that the cocoon membrane is asymmetric, it allows preferential gating of CO 2 from inside to outside and it regulates a physiological temperature inside the cocoon irrespective of the surrounding environment temperature. We demonstrate that under simulating CO 2 rich external environment, the CO 2 does not diffuse inside the cocoon. Whereas, when CO 2 was injected inside the cocoon, it diffuses out in 20 s, indicating gating of CO 2 from inside to outside the membrane. Removal of the calcium oxalate hydrate crystals which are naturally present on the outer surface of the cocoon affected the complete blockade of CO 2 flow from outside to inside suggesting its role to trap most of the CO 2 as hydrogen bonded bicarbonate on the surface. The weaved silk of the cocoon worked as the second barrier to prevent residual CO 2 passage. Furthermore, we show that under two extreme natural temperature regime of 5 and 50°C, a temperature of 25 and 34°C respectively were maintained inside the cocoons. Our results demonstrate, how CO 2 gating and thermoregulation helps in maintaining an ambient atmosphere inside the cocoon for the growth of pupa. Such natural architectural control of gas and temperature regulation could be helpful in developing energy saving structures and gas filters.