The preparation of CuO thin films by in situ oxidation of Cu ultrathin films deposited on MgO(100) and SrTiO3(100) substrates in ultrahigh vacuum has been studied. The films were characterized by reflection high energy electron diffraction (RHEED), X-ray diffraction, reflection X-ray pole figure analysis, and X-ray photoelectron spectroscopy. The growth processes of Cu and CuO thin films were different depending on the substrates: Cu grows epitaxially on SrTiO3, while it grows with random orientation on MgO. CuO thin films grow epitaxially on MgO, but not on SrTiO3(100). Films with thicknesses above 40 angstrom on MgO have an epitaxial plane, in which Cu atoms are surrounded by four coplanar oxygen ions.