The impact of inlet fuel temperature on the performance and emission characteristics of a 406 cc, single‐cylinder, air‐cooled, 4‐stroke, direct injection (DI) diesel engine was investigated to determine the suitable temperature of fuel for the best conditions of the engine in lean and ultra‐lean mixture combustion mode. B20 palm oil biodiesel‐diesel blend fuel (B20 POBD), as common renewable fuel and favorite biodiesel blend ratio used in the research, was provided and injected in the engine at varying temperatures in the range of 10–40°C and the engine parameters including the output power, specific fuel consumption (SFC), thermal efficiency, flue gas heat recovery efficiency and CO and NOx pollutant emissions were measured at different air–fuel ratios corresponded to lean and ultra‐lean mixtures. The results showed that there is an optimum temperature for fuel (about 20°C) in which maximum thermal efficiency and minimum SFC and CO emission are obtained. The minimum SFC and CO emission were 0.45 Kg/kWh and 610 ppm at the optimum temperature and output power of 1.5 kW, respectively. The effect of fuel temperature on SFC and CO increases as the output power decreases and for all fuel temperatures, the output power is inversely related to the air–fuel ratio. In addition, the elevated output power reduces the CO emission in all inlet fuel temperatures. Furthermore, an ultra‐lean mixture (very high A/F ratio) can dramatically decrease the thermal efficiency of diesel engines at all fuel temperatures, such that at the inlet fuel temperature of 17°C, increase in A/F ratio from 51 to 108 decreases the thermal efficiency from 16.8% to 0.12%. Finally, low engine output power leads to low levels of NOx emission, such that decrease in output power from 1.5 to 0.5 kW reduces the NOx emission from 522 to 204 ppm, respectively.