By using C++ Builder language, the simulation software which could simulate variable running conditions of a sequencing batch reactor (SBR) process independently had been worked out. Then, the factors of sludge age, dissolved oxygen (DO), drainage ratio, and arrangement of period of time affecting biological nitrogen removal in wastewater treatment were simulated and discussed respectively by applying the activated sludge model No.2d (ASM2d) model. The results showed that high sludge age and DO, and low drainage ratio were favorable for improving nitrogen removal efficiency. However, this favorable trend became unobvious when DO concentration reached a certain degree. In addition, better nitrogen removal efficiency was achieved by using restrained reaction system rather than non-restrained one, and operational way of aeration alternating with mixing could also improve nitrogen removal effect. Therefore, the optimal condition achieving better nitrogen removal was found, sludge age 20d, DO 2.0mg/L, drainage ratio 2/5, restrained reaction system, and aeration alternating with mixing.