Mechanical properties of AlxGa1-xN thin films with high Al composition (0.33≤x≤1) grown on AlN/sapphire templates have been investigated by means of the nanoindentation technique. It is found that Young’s modulus E of the films increases with increasing Al composition. In addition, it is also found that the occurrence of the clear and sudden displacement discontinuity (“pop-in”) in the plastic deformation (PD) process is dependent on Al composition in AlxGa1-xN films. The higher Al composition results in less occurrence of the pop-in in the PD process of the films. With increasing Al composition, it is believed that the increase of the bond strength and the decrease of the lattice mismatch between AlxGa1-xN films and AlN/sapphire templates result in greater resistance to the formation of dislocations, which is responsible for the pop-in behavior in AlxGa1-xN films.