Mercury soil contamination is an important environmental problem that needs the development of sustainable and efficient decontamination strategies. This work is focused on the application of a remediation technique that maintains soil ecological and environmental services to the extent possible as well as search for alternative sustainable land uses. Controlled thermal desorption using a solar furnace at pilot scale was applied to different types of soils, stablishing the temperature necessary to assure the functionality of these soils and avoid the Hg exchange to the other environmental compartments. Soil mercury content evolution (total, soluble, and exchangeable) as temperature increases and induced changes in selected soil quality indicators are studied and assessed. On total Hg, the temperature at which it is reduced until acceptable levels depends on the intended soil use and on how restrictive are the regulations. For commercial, residential, or industrial uses, soil samples should be heated to temperatures higher than 280 °C, at which more than 80 % of the total Hg is released, reaching the established legal total Hg level and avoiding eventual risks derived from high available Hg concentrations. For agricultural use or soil natural preservation, conversely, maintenance of acceptable levels of soil quality limit heating temperatures, and additional treatments must be considered to reduce available Hg. Besides total Hg concentration in soils, available Hg should be considered to make final decisions on remediation treatments and potential future uses. Graphical Abstract Solar energy use for remediation of soils affected by mercury.