This work presents a systematic study of stress and strain of AlxGa1-xN/AlN with composition ranging from GaN to AlN, grown on a c-plane sapphire by metal-organic chemical vapor deposition, using synchrotron radiation high-resolution X-ray diffraction and reciprocal space mapping. The c-plane of the AlxGa1-xN epitaxial layers exhibits compressive strain, while the a-plane exhibits tensile strain. The biaxial stress and strain are found to increase with increasing Al composition, although the lattice mismatch between the AlxGa1-xN and the buffer layer AlN gets smaller. A reduction in the lateral coherence lengths and an increase in the edge and screw dislocations are seen as the AlxGa1-xN composition is varied from GaN to AlN, exhibiting a clear dependence of the crystal properties of AlxGa1-xN on the Al content. The bandgap of the epitaxial layers is slightly lower than predicted value due to a larger tensile strain effect on the a-axis compared to the compressive strain on the c-axis. Raman characteristics of the AlxGa1-xN samples exhibit a shift in the phonon peaks with the Al composition. The effect of strain on the optical phonon energies of the epitaxial layers is also discussed.