Trace element levels of heavy metals in crude oil are reduced by contacting the crude oil with an oxidizing agent, extracting heavy metals into a water phase for subsequent separation from the crude oil. The oxidizing agent is selected from the group of hydroperoxides, organic peroxides, inorganic peracids and salts thereof, organic peracids and salts thereof, and ozone. In one embodiment, the oxidizing agent converts heavy metals into the heavy metal cations in a water-oil emulsion, which can be subsequently separated from the crude oil, for a treated crude oil having reduced levels of heavy metals. In one embodiment, at least a complexing agent can be added to facilitate the removal by forming soluble heavy metal complexes in the water phase.