To cope with the environmental impact of aviation and pollution problems in the future, airlines need to assess environmental impacts and offer countermeasures in advance. In order to measure the influence of environment on the airlines’ operational costs, this paper establishes an aircraft green direct operating cost (GDOC) model to quantify adverse environmental effects, such as air pollution and greenhouse effects, into the direct operating cost (DOC). Furthermore, fuel consumption, flight time, and distance in the cruising stage account for about 80% of the entire flight mission, and optimizing cruise flight performance can contribute greatly to reduce GDOC. Therefore, this paper sets up an optimal control model to minimize GDOC, establishes a discrete time dynamic system for optimizing the cruise altitude and speed profiles, and searches the optimal results by using dynamic programming. Besides, as meteorological conditions affect aircraft aerodynamics, fuel flow rate, contrail formation, and so on, this paper analyzes meteorological uncertainty by using historic meteorological data. Finally, a route is selected as an example, and the rationality of the optimal results is proven by comparing GDOC with DOC. The results and discussion of the numerical test also show that environmental effects on aircraft operation can be reduced significantly by adopting GDOC as the optimization objective, especially the contrail cost, and the step-climb cruise mode can further reduce GDOC effectively.