Oxygen permeability is a critical property of protein nanocages (PNCs) that impacts or dictates the functions of PNCs. However, it remains challenging to determine it experimentally. Here, we report compartmentalized oxygen sensing inside PNCs by assembling matryoshka-type structures through interfacial engineering, namely, one PNC containing another smaller one functionalized with small-molecule oxygen probes. Oxygen in the lumen of the outer PNCs can be probed conveniently via phosphorescence spectrometry. This method enabled the analysis of two representative PNCs, MS2 virus-like particles and Thermotoga maritima encapsulin, revealing the former is oxygen permeable, while the latter is oxygen impermeable. This study establishes a general approach for measuring the oxygen permeability of PNC shells, which can provide an experimental basis for understanding the working mechanisms of PNCs and inspire applications like oxygen-sensitive or oxygen-responsive sensing, catalysis, and delivery. Also, the tunable nested PNCs may serve as platforms for designing hierarchical or compartmentalized devices or organelles.