An optimization method for BP neural networks based on the butterfly optimization algorithm (BOA) is proposed to address the issue of inaccurate path planning for quadcopters in multi-obstacle environments. The points of the quadcopter along the designated path are used as training samples for the neural network, and the BOA-BP algorithm is employed to train the network to determine the optimal flight path. The simulation results show that the proposed BOA-BP model effectively reduces the path error of the quadcopter compared to the traditional BOA algorithm, with the root mean square error decreasing from 1.60% to 0.003%.