Exergy analysis, which is based on the first and second thermodynamic laws, is a significant tool to assess energy systems. In this study, energy and exergy analyses of a compression ignition internal combustion engine operating with sunflower methyl and ethyl ester and their blends with diesel fuel no. 2 are investigated. Results are presented as the first and the second law efficiency, effective work, and exergy destruction values at 10 different engine speeds. It is concluded that 75% and 50% ethyl ester blends are the most appropriate fuels for the engine in terms of its performance.