Surface segregation-the enrichment of one element at the surface, relative to the bulk-is ubiquitous to multi-component materials. Using the example of a Cu-Au solid solution, we demonstrate that compositional variations induced by surface segregation are accompanied by misfit strain and the formation of dislocations in the subsurface region via a surface diffusion and trapping process. The resulting chemically ordered surface regions acts as an effective barrier that inhibits subsequent dislocation annihilation at free surfaces. Using dynamic, atomic-scale resolution electron microscopy observations and theory modelling, we show that the dislocations are highly active, and we delineate the specific atomic-scale mechanisms associated with their nucleation, glide, climb, and annihilation at elevated temperatures. These observations provide mechanistic detail of how dislocations nucleate and migrate at heterointerfaces in dissimilar-material systems.