The invention provides an unmanned aerial vehicle trajectory planning method based on EB-RRT. The method comprises the steps that grid partitioning is carried out on a map environment; a node xnearst nearest to a random point in existing nodes is found; an insertion point xnew is calculated according to the step length; if the sum of the distance between a root node to xnew and the Euclidean distance between xnew and the end is not greater than the length of the current optimal path, whether the xnew point is in an obstacle is detected; if not, the surrounding environment information of xnearst is collected, and a new insertion point xnew is randomly sampled in the surrounding free area; xnew is inserted into a tree; the nearby node set of xnew is traversed and found in the corresponding grid, and the path of the nearby nodes is optimized; connection detection is carried out on two trees into which the xnew point is inserted; if not, two trees are exchanged, and random points continue to be sampled; if so, a feasible path is found, and downsampling is carried out; and a Bessel cubic interpolation algorithm is used to optimize the new path. The unmanned aerial vehicle trajectory planning method provided by the invention has the advantages of high convergence speed, good flexibility, high running efficiency and good practicability.