The polarity of GaN epitaxial films grown on LiGaO2(001) substrates by pulsed laser deposition has been well controlled. It is experimentally proved that the GaN epitaxial films grown on nitrided LiGaO2(001) substrates reveal Ga-polarity, while the GaN epitaxial films grown on non-nitrided LiGaO2(001) substrates show N-polarity. The growth mechanisms for these two cases are systematically studied by first-principles calculations based on density functional theory. Theoretical calculation presents that the adsorption of a Ga atom preferentially occurs at the center of three N atoms stacked on the nitrided LiGaO2(001) substrates, which leads to the formation of Ga-polarity GaN. Whereas the adsorption of a Ga atom preferentially deposits at the top of a N atom stacked on the non-nitrided LiGaO2(001) substrates, which results in the formation of N-polarity GaN. This work of controlling the polarity of GaN epitaxial films is of paramount importance for the fabrication of group-III nitride devices for various applications.