There is tremendous interest in the development of highly wear-resistant coatings for metallic materials to reduce energy loss and prolong service life. In this study, the authors propose an approach to develop nanocomposite coatings featuring deformable nanocrystals embedded in amorphous matrix for self-lubrication and superior wear resistance. The dual-layered nanocomposite coatings are prepared by plasma electrolytic oxidation (PEO) on a Ti-Nb-Ta-Zr-Hf (TNZTH) refractory multi-principal element alloy (RMPEA) and commercially pure Ti (cpTi). The inner layers of PEO coatings are composed of substrate element oxides (amorphous TNZTH─O oxide or anatase TiO2), while their outer layers exhibit typical nanocomposite structures. Different from the cpTi-based PEO coating outer layers composed of brittle rutile TiO2 nanoparticles dispersed in an amorphous matrix of SiO2 and Na2O·nSiO2, the outer layers of TNZTH-based PEO coatings are featured by deformable Na2Zr(Hf)O3 nanocrystals heterogeneously embedded in an inhomogeneous amorphous matrix composed of TNZTH─O oxide, SiO2, and Na2O·nSiO2. As a result, the TNZTH-based PEO coatings exhibit favorable self-lubricating performance and superior wear resistance, while the cpTi-based PEO coatings are completely destroyed after sliding wear. Thus, this study offers valuable insights into the design and development of self-lubricating coatings with superior wear resistance for metallic materials.