In this project, the interaction and adsorption of the toxic phosgene (COCl2) gas on the surface of pristine and B, Aldoped Si12C12 nanocage was investigated by density functional theory (DFT) and time dependent density functional theory (TD-DFT). Optimized structures were applied for calculating the geometrical and electrical parameters, adsorption energy, quantum parameters, and thermodynamic properties and reduced density gradient (RDG) scatter plots. The calculated results indicated that the adsorption energy and enthalpy values of all studied structures were negative and all processes were exothermic. With doping B and Al atoms the absolute values of adsorption energy increase significantly from pristine models, so doped models were a good candidate for adsorbing COCl2 toxic gas. The gap energy and global hardness of nano cluster in the presence of doping atoms and COCl2 gas decrease significantly, and also the conductivity, reactivity of nanocluster increase, this property demonstrated that the B, Al doped Si12C12 was a good sensor and absorber for detecting COCl2 gas.