This paper applies a dynamic path planning and model predictive control (MPC) to simulate self-driving and parking for an electric van on a hardware-in-the-loop (HiL) platform. The hardware platform is a simulator which consists of an electric power steering system, accelerator and brake pedals, and an Nvidia drive PX2 with a robot operating system (ROS). The vehicle dynamics model, sensors, controller, and test field map are virtually built with the PreScan simulation platform. Both manual and autonomous driving modes can be simulated, and a graphic user interface allows a test driver to select a target parking space on a display screen. Three scenarios are demonstrated: forward parking, reverse parking, and obstacle avoidance. When the vehicle perceives an obstacle, the map is updated and the route is adaptively planned. The effectiveness of the proposed MPC is verified in experiments and proved to be superior to a traditional proportional–integral–derivative controller with regards to safety, energy-saving, comfort, and agility.