In magnetic confinement thermonuclear fusion the exhaust of heat and particles from the core remains a major challenge. Heat and particles leaving the core are transported via open magnetic field lines to a region of the reactor wall, called the divertor. Unabated, the heat and particle fluxes may become intolerable and damage the divertor. Controlled ‘plasma detachment’, a regime characterized by both a large reduction in plasma pressure and temperature at the divertor target, is required to reduce fluxes onto the divertor. Here we report a systematic approach towards achieving this critical need through feedback control of impurity emission front locations and its experimental demonstration. Our approach comprises a combination of real-time plasma diagnostic utilization, dynamic characterization of the plasma in proximity to the divertor, and efficient, reliable offline feedback controller design.