Surface oxygen chemistry of semiconductor metal oxides is the basis for the sensing reaction between the preadsorbed surface oxygen and the target gases or organic vapors that are to be detected, and thus fundamentally determines their sensing performances. Herein, we, for the first time, identify a novel semiconductor spinel oxide, CdGa 2 O 4 , that has suitable surface oxygen chemistry and exhibits excellent selectivity and response toward formaldehyde. Moreover, we find that a cation offstoichiometric CdGa 2 O 4 spinel oxide decorated with a small amount of CdO nanocrystals can further improve the formaldehyde response, without losing the selectivity. This is based on the advantages of an increased amount of adsorbed oxygen in the Ga-rich environment, as well as heterojunctions between CdO nanoparticles and Ga-rich spinel oxide. Sensing performance (e.g., selectivity and response) of the material is much better than that of most reported nanostructured metal oxides used for formaldehyde detection. Our findings propose a general approach for achieving highly selective and sensitive detection of target gases by optimizing the surface oxygen property of semiconductor oxides.