The optimal unmanned aerial vehicle (UAV) path planning using bio-inspired algorithms requires high computation and low convergence in a complex 3D environment. To solve this problem, a hybrid A*-FPA algorithm was proposed that combines the A* algorithm with a flower pollination algorithm (FPA). The main idea of this algorithm is to balance the high speed of the A* exploration ability with the FPA exploitation ability to find an optimal 3D UAV path. At first, the algorithm starts by finding the locally optimal path based on a grid map, and the result is a set of path nodes. The algorithm will select three discovered nodes and set the FPA's initial population. Finally, the FPA is applied to obtain the optimal path. The proposed algorithm's performance was compared with the A*, FPA, genetic algorithm (GA), and partical swarm optimization (PSO) algorithms, where the comparison is done based on four factors: the best path, mean path, standard deviation, and worst path length. The simulation results showed that the proposed algorithm outperformed all previously mentioned algorithms in finding the optimal path in all scenarios, significantly improving the best path length and mean path length of 79.3% and 147.8%, respectively.