Biodiesel has the potential to be used as an alternative to diesel fuel, while NOX emissions from biodiesel engine are higher than those of diesel engine. According to the Zeldovich mechanism, thermal NO is the main pathway for NOX formation. Therefore, studying the temperature of biodiesel combustion flame is of great significance for understanding the formation mechanism of NOX. Hence, this paper is devoted to the investigation of effects of biodiesel combustion flame temperature on NOX formation by using Endoscope high-speed photography. The experimental work has been carried out on a diesel engine fueled with three different blending-ratios of biodiesel/diesel fuel (B0, B50, B100). The image of the engine combustion process was captured by high-speed endoscopic photography, and the flame temperature field distribution was calculated based on the brightness of the in-cylinder combustion flame image. The parameters of in-cylinder flame temperature and their changing laws with engine speed and blending-ratios were also analyzed by using six indicators, such as NOX formation flame area (SNO), flame area change velocity (VNO), mean flame area change velocity (VNOM), flame area duration (ϕNO), flame appearance efficiency (ηNO) and adiabatic flame temperature (TP). Results showed that with the increase of biodiesel fuel proportion, the positions of SNOappearance and disappearance were advanced, the peak values of SNO,VNOVNOM, ηNObecame greater, andϕNObecame shorter, which indicated that more beneficial environment to NOX formation occurs as biodiesel fuel proportion increases.