Extreme conditions are normal for animals living in harsh environments. These animals adapt to their habitats and can use difficult conditions by default. Organisms living in enclosed spaces, notably termites in decaying wood, experience low O
2
and high CO
2
gas conditions due to limited gas exchange and high insect density. Termite queens, in particular, reproduce in royal chambers deep inside the wood, wherein tens of thousands of individuals engage in social labour. Here, we demonstrate that royal chambers in termite nests have low O
2
and high CO
2
gas concentrations, which enhance egg production by queens. We identified a unique gas condition of royal chambers in the nest of the subterranean termite
Reticulitermes speratus
, which is characterized by low O
2
(15.75%) and high CO
2
(4.99%) concentrations. Queens showed significantly greater fecundity under the low O
2
and high CO
2
gas conditions in the royal chambers than under ambient gas conditions. Quantitative PCR analysis revealed that the royal chamber gas conditions significantly promoted the expression levels of the vitellogenin genes
RsVg1
,
RsVg2
and
RsVg3
in queens compared with ambient gas conditions. This study highlights the adaptation of animals that live in closed habitats, which are hypoxic and hypercapnic as the result of their own metabolism, so as to have a high fitness in such environmental conditions.