Gallium nitride (GaN) and indium nitride (InN) films were grown on a zinc oxide (ZnO) single crystalline substrate with a (0001) orientation using molecular beam epitaxy. The interfacial structure and relaxation mechanism of the lattice mismatch at the nitride/oxide interface were investigated, particularly the effects of an (In,Ga)N alloy buffer layer on the interfacial structure of the GaN films. This layer significantly improved the crystallinity of the GaN films by gradually relaxing the lattice mismatch between the GaN and ZnO. In spite of the large lattice mismatch between InN and ZnO, InN films with high crystallinity were grown without an (In,Ga)N buffer layer. Structural analysis revealed that an InN layer with low crystallinity formed spontaneously during the initial growth stage, and this amorphous-like layer likely contributed to relaxation of the interfacial stress caused by the lattice mismatch.