This paper presents a new approach based on Artificial Potential Fields (APF) which provides real-time and very effective methodology for practical motion planners in unknown dynamic environments. The Maxwell's equations are exploited to define Artificial Magnetoquasistatic Fields (AMF) as an extension of APF, which provides a predictive, intelligent, and natural behavior in contrast with other approaches. The essential aim of the AMF is dealing with moving obstacles, as well as static ones. The main idea is to consider an electrical current in the direction of each moving obstacle which induces magnetic field around it. These moving obstacles could be arbitrary in shape, size, and number. Neither the motion-trajectory of the moving obstacles nor the model of their motion is known. The only available information is their instantaneous velocity at each time step. In this method, the magnetoquasistatic approximation is used to obtain the electric and magnetic fields around robot. Next, using Lorentz equation, the necessary force can be calculated which should be applied to robot to avoid the collision with obstacles. A path planner based on this approach has been implemented and tested by various scenarios containing both static and moving obstacles. Simulations and experimental results illustrate the efficacy of the proposed method.