Azomethane (CH2N2) presents a notable hazard as a respiratory irritant, resulting in various adverse effects upon exposure. Environmental research seeks sensitive sensor materials for its detection. This study analyzes CH2N2 adsorption on nanocages (C1, CY1, CZ1) and pristine MgO using DFT/ωB97XD method.