Heterogeneous high-entropy/medium-entropy alloy coatings have the potential of being advanced tribo-components for service in demanding environments. We incorporate dual-heterostructure (Al2O3-type oxides and Ag-rich phases) into the deposited CoCrNiAl0.3Ti0.3 medium-entropy alloy coating employing in-situ flight oxidation and solute addition during detonation spraying. Such heterostructures improve the coating quality and serves twofold, through deposition densification and solid-solution strengthening, contributing to an ultra-low porosity of < 0.6 %, a high bond strength of 61 MPa, and a hardness of 7.6 GPa. The self-organized tribo-layer activated by the heterostructures inhibits abrasive wear at room-temperature, but struggles to resist surface softening and adhesion at 600 ℃. Heterostructures govern the formation of protective glaze-layers and Ag transfer films at 800 ℃ and 1000 ℃, minimizing adhesion and delamination between the tribo-pairs.