The rapid development of unmanned aerial vehicle (UAV) has made great progress for its widespread uses in military and civilian applications in recent years. One of the most important issues related to the UAV application is UAV path planning especially in harsh environment. In order to find the optimal route as well as effectively avoid three-dimensional obstacles, the performance of UAV path planning algorithm is essential. This paper proposes an improved three-dimensional A∗ algorithm which is based on Digital Elevation Map (DEM) to obtain the initial path and combines Bresenham line-drawing algorithm to line the initial path. Finally Bezier is used curve to smooth the lining path. Above all, can get three-dimensional smooth path that satisfy the fixed wing UAVs security and kinematic constraints. The simulation results have shown that the path planning algorithm is effective in fixed wing UAV three-dimensional path planning. Based on the attitude sensor, a real-time three-dimensional navigation scene simulation system is constructed, which can effectively show the process of three-dimensional navigation and obstacle avoidance.