This paper studies the combustion performance of diesel in constant volume combustion vessels under different conditions of mixed low-nitrogen (O2 and N2) or non-nitrogen (O2 and CO2) in varying proportions. The high-speed camera is used to shoot the combustion flame in the constant volume combustion vessel. The process and morphology of the combustion flame are amplified in both time and space to study and analyze the effects of different compositions and concentrations in gases on the combustion performance of diesel and conduct a study on the contributory factors in the performance of diesel with no nitrogen. According to the study, in the condition of low nitrogen, the O2 concentration is more than 60%, the ignition delay period is shortened, the combustion flame is bright and slender, it spreads quickly, and the blue flame appears when the O2 concentration reaches 70%; While for nitrogen-free combustion, only when the O2 concentration reaches 30% is the combustion close to the air condition; when the O2 concentration reaches 40%, the combustion condition is optimized obviously and the combustion flame is relatively slender compared to the air working condition. Similarly, with the increase of the O2 concentration, the ignition delay period of nitrogen-free diesel is shortened, the duration is extended, and the combustion performance is optimized. In addition, when the O2 concentration reaches 50%, with the decrease of the initial temperature, the ignition delay period is prolonged, and the duration is shortened obviously. When the temperature is lower than 700 K, there is no ignition. The increase of the diesel injection pressure is beneficial to optimize the ignition performance of diesel non-nitrogen combustion and shorten its ignition delay period and combustion duration. Related research has important guiding significance to optimize nitrogen-free combustion technology, which produces no NOx of the diesel engine.