A dynamic motion primitive (DMP) is a robust framework that generates obstacle avoidance trajectories by introducing perturbative terms. The perturbative term is usually constructed with an artificial potential field (APF) method.Dynamic obstacle avoidance is rarely considered with this approach; furthermore, even when dynamic obstacles are considered, only the velocity and position information of the current state are incorporated into the obstacle avoidance framework. However, if the position of an obstacle changes suddenly, a robot may be placed in a dangerous position close to the obstacle, resulting in large obstacle avoidance accelerations, sharp trajectories, or even obstacle avoidance failure. Therefore, we present a model predictive obstacle avoidance method based on dynamic motion primitives and a Kalman filter. This method has three main components: Dynamic motion primitives are used to generate the desired trajectory and introduce perturbations to achieve obstacle avoidance; the Kalman filter method is adopted to estimate the future positions of the obstacles; and model predictive control is employed to optimize the repulsive force generated by the APF while minimizing the defined cost function, thus guaranteeing the safety and flexibility of the method. We validate the presented method with 2D and 3D obstacle avoidance simulations. The method is also verified with a real robot: the-Kinova MOVO. The simulation and experimental results show that the proposed method not only avoids dynamic obstacles but also tracks the desired trajectory more smoothly and precisely. KEYWORDS artificial potential field (APF), dynamic motion primitive (DMP), dynamic obstacle avoidance, kalman filter, model predictive control (MPC)