Power lines or underground power cables generate electromagnetic interaction with other objects near to them. This study evaluates the magnetic field emitted by underground extra high voltage cables. The presented work aims to show a numerical simulation of the magnetic field of a buried 400 kV underground power line, which is used as a novel prototype in several countries at a short distance. The underground power cable study, in the presence of the current harmonics at different positions, with time variation by finite element resolution, using Comsol Multiphysics with Matlab software in two dimensions. The simulation results illustrate the magnetic flux density variation-in terms of amplitude and distribution as a function of different actual harmonics rates. The underground cable performance and magnetic field have affected by the harmonics effects. The maximum magnetic induction levels generated by significant harmonics are superior to the limits recommended by the international standard norms. In this paper, shielding has been used as an appropriate remedy to attenuate the magnetic field