Optimization in the chemical and petroleum industry is gaining increased interest because of its importance in maintaining product quality and enhancing production levels while improving profit margins. In this article, simulation of the atmospheric distillation unit of an existing petroleum refinery is carried out. Optimization was performed on the prepared simulation through the use of a sequential quadratic programming approach (SQP). The objective function consisted of energy minimization and production level maximization. The results obtained from optimization were implemented on the real process and it was demonstrated that the suggested changes increased overhead production levels and maintained product quality. Furthermore, a net economical balance between the increment of overhead products and the energy consumption showed an energy savings in the refinery.