In the present paper, a density functional systematic study of the adsorption of atomic oxygen on the (001) surface of several transition-metal carbides (TMC, TM = Ti, Zr, Hf, V, Nb, Ta, Mo) is reported. Our calculations using both PW91 and RPBE exchange correlation functionals show that on group 4, TMC (100) oxygen atoms highly prefer the hollow sites surrounded by one carbon atom and two metal atoms (MMC). On the rest of TMC of group 5 and 6, a competition between this site and the adsorption on top of a metal atom (M-top) is observed. A third possible competitive site is found for the delta-MoC site, where a kind of CO-like molecule is formed and adsorbed on the carbon vacancy site. The strong interaction of O with the C explains the availability of carbon removal from the TMC and the formation of metal oxocarbide compounds by oxidation, especially at high temperatures. An electronic analysis is also included to understand the different behaviors of the carbides toward O adsorption.