The growth modes of GaN thin films on an AlN(0001) substrate are systematically investigated using our macroscopic theory with the aid of empirical interatomic potential and ab initio calculations. Using empirical interatomic potential calculations, we demonstrate that a GaN/AlN(0001) system with misfit dislocation (MD) is stabilized compared with a coherently grown system when the GaN film thickness exceeds six monolayers. According to the calculated results including the surface energy of GaN, the macroscopic free energy calculations for the growth mode imply that the growth of GaN on AlN(0001) proceeds along the lower-energy path from two-dimensional coherent (2D-coherent) to 2D-MD under Ga-rich conditions but from 2D-coherent to three-dimensional coherent with truncated hexagonal pyramid islands consisting of {} facets under N-rich conditions owing to surface energy anisotropy, which depends strongly on the growth conditions. These results suggest that surface energy anisotropy is crucial for the growth of GaN on an AlN(0001) substrate.