This paper analyzes the path planning problem in the automatic parking process, and studies a path planning method for automatic parking. The grid method and the ant colony optimization are combined to find the shortest path from the parking start point to the end point. The grid method is used to model the parking environment to simulate the actual parking space of automatic parking; then this paper makes some improvements to the basic ant colony optimization, finds the destination by setting the ants’ movement rules in the grid, and finds the shortest path after N iterations; since the optimal path found is a polyline, it will increase the difficulty of controlling vehicle path tracking and affect the accuracy of vehicle path tracking. The bezier curve is used to generate a smooth path suitable for vehicle walking. Finally, through matlab simulation, the obstacles in the environment are simulated, and the parking trajectory is obtained. The results show that the path planning method proposed in this paper is feasible.