We have investigated effects of O on mechanical properties of NiAl by calculating the cleavage energy (γ(C)) and the unstable stacking fault energy (γ(us)) using a first-principles method. O is shown to reduce γ(C)/γ(us) for the [001](110) and [100](001) slip systems, indicating that the presence of O should be associated with the ductility reduction of NiAl. Further, γ(C)/γ(us) of the NiAl-O system can be increased by Cr, suggesting the possibility to suppress the negative effect of O via alloying elements.