An onboard real-time optimal control method is applied to the guidance of an aircraft in the interest of balancing safe and efficient flight. The aircraft, which has a laser LIDAR (LIght Detection And Ranging) system to detect turbulence in the forward region, is given the real-time optimal control to avoid the region. The real-time optimal control algorithm in this study is based on Receding Horizon control method with Neighboring Extremal method. The Neighboring Extremal method, which solves the change in the optimal solution into the variation of the problem definition, can be applied only in the case that the variation is very small, and it is difficult to efficiently deal with inequality constraint conditions in the problem. This paper aims to resolve these issues. To confirm the effectiveness of the proposed algorithm, the avoidance flight from the turbulence that the aircraft encounters is numerically simulated, and satisfactory results are obtained.