This study investigated the performance of a compression ignition engine operating with sunflower ethyl ester. A thermodynamic analysis, including energy and exergy analysis at different engine loads (20%, 40%, 60%, 80%, 100%), was conducted. The study calculated the first and second law efficiency, effective work, heat exergy losses and exergy destruction values at 10 different engine speeds for 5 loads. Maximum work, maximum thermal efficiency, maximum exergy efficiency and maximum volumetric efficiency are determined to be 6.45 kW, 0.26, 0.24 and 0.71 respectively. Finally, optimum operating conditions are discussed and it was determined that the engine should be operated at a lower engine speed for partial loads.