In this article, combined active flow control system and flight control system design for morphing unmanned aerial vehicles is applied for the first time for autonomous flight performance maximization. For this purpose, longitudinal and lateral dynamics modeling of morphing unmanned aerial vehicle having active flow control manufactured in Erciyes University, Faculty of Aeronautics and Astronautics, Model Aircraft Laboratory is considered in order to obtain simulation environments. Our produced morphing unmanned aerial vehicle is called as ZANKA-II, which has a mass of 6.5 kg, range of 30 km, endurance of 0.5 h, and ceiling altitude of 6000 m. von Karman turbulence modeling is used in order to model atmospheric turbulence during flight in both longitudinal and lateral simulation environments. A stochastic optimization method called as simultaneous perturbation stochastic approximation is also applied for the first time in order to obtain optimum dimensions of morphing parameters (i.e. extension ratios of wingspan and tail span), optimum positions of blowers, and optimum magnitudes of longitudinal and lateral controllers' gains (i.e. P, I, and D gains) while minimizing cost index capturing terms for both longitudinal and lateral autonomous flight performances and there exist lower and upper constraints on all optimization variables in the literature.