In order to meet the needs for the safe operation of unmanned aerial vehicles (UAV)s in cities, this paper proposes a multi-objective path planning method based on a particle swarm optimization algorithm. Firstly, a complex urban environment model is constructed by using the grid method. Then, taking the total length of the UAV path and the minimum flight risk as objectives, the multi-objective path optimization problem is established under the condition of taking into account the obstacle avoidance requirements and performance constraints of the UAV. Finally, the optimization problem is solved by a multi-objective particle swarm optimization algorithm and the path curve is smoothed by cubic B-spline. The simulation results show that the multi-objective path planning method proposed in this paper is more reasonable than the method that only considers the lowest security risk or the shortest path.