Photoluminescence (PL) and optically detected magnetic resonance are employed to study effects of nonstoichiometry during the growth on defect formation in ZnO epilayers grown by molecular-beam epitaxy (MBE). Several defects are revealed via monitoring the yellow PL emission (∼2.17 eV) and their magnetic resonance signatures are obtained. The defects are concluded to be common for the MBE growth and are facilitated during the off-stoichiometric growth conditions, especially under excess of oxygen. © 2008 American Institute of Physics.