The Fluid Catalytic Cracking Unit (FCCU) serves as the lifeblood of a modern refinery, playing a crucial role in ensuring superior product quality. This paper delves into the design of a nonlinear Proportional-Integral-Derivative (PID) control mechanism aimed at regulating the temperature of both the reactor and the regenerator within the FCCU. A total of four nonlinear PID controllers have been meticulously designed, two each for controlling the temperature of the reactor and the regenerator. Utilizing the cross-coupling method, these controllers are proficient in compensating for the effects of cross-coupling and the nonlinearities inherent in the model. The Firefly algorithm, renowned for its capability in finding optimal solutions to intricate optimization problems, has been employed for tuning the parameters of the controllers. The outcomes discussed in this paper underscore the transient responses of the reactor temperature, featuring an overshoot of 0.239% and a rise time of 24.87631 sec. For the regenerator temperature, the overshoot stands at 0.703% with a rise time of 25.636 sec. These results highlight significant improvements in product quality, achieved by enhancing and closely monitoring the temperatures of both the reactor and the regenerator within the FCCU-an aspect of paramount importance in the oil industry.