The invention discloses an unmanned aerial vehicle obstacle avoidance method based on deep reinforcement learning, and the method comprises the following steps: 1), building an unmanned aerial vehicle obstacle avoidance flight model in a three-dimensional space, and randomly generating the number and position of obstacles, and the starting point of an unmanned aerial vehicle; (2) establishing an environment model based on a Markov process framework, (3) selecting actions based on states and strategies, enabling the unmanned aerial vehicle to interact with the environment to generate a new state after taking the actions, calculating an obtained reward, forming quaternions by the states, the actions, the reward and the actions at the next moment, and storing the quaternions in a sample space through an improved method for sample sampling training; 4) performing network updating on a sample obtained by sampling the environment model by adopting an improved DDQN algorithm, and assigning a state-action pair of the sample; and 5) selecting an optimal action according to the assignment of each action in the state in the sample, and further obtaining an optimal strategy. The invention provides the reinforcement learning obstacle avoidance method adopting the segmentation sampling pool, and the training efficiency of the generation strategy is improved.