This paper presents an optimization procedure of a fuel injection system of a bus diesel engine. Attention is focused on the differences resulting from using two different types of fuel: diesel and biodiesel. The proposed design procedure relies on the assumption that the atomization of fuel spray influences the diesel engine performance, fuel consumption, and harmful emission significantly. As a measure of spray atomization, the Sauter mean diameter is employed and introduced into the objective function. The design problem is formulated in the form of a multiobjective optimization problem, taking into account the ESC 13 mode test for diesel engines of commercial vehicles. The design variables of the injection system are related to the shape of the cam profile, to the nozzle geometry, and to the control parameters influencing the injection quantity and timing. The geometrical properties of the cam profile and the injection parameters are kept within acceptable limits by the imposed constraints. The results of optimization using diesel and biodiesel are compared to each other to show the influence of fuel type on final design and performance of the system.