The petroleum refining process generates large quantities of wastewater that discharge of untreated wastewater into water bodies results in environmental and human health effects due to the release of toxic containments. In this study, the biological removal of ammonia from petroleum refinery wastewater in a bench-scale rotating biological contactor (RBC) under continuous operation was investigated. The experiments were conducted base on a central composite design to evaluate the effect of four significant independent variables on the performance of the system. Response surface methodology was applied to minimize the number of runs and investigating the interactive effects of variables on ammonia and chemical oxygen demand (COD) removals. The RBC was operated at different hydraulic loading rates of 0.005, 0.008, and 0.016 m3/m2d. The optimum conditions were the temperature of 32.19 °C, influent ammonia concentration of 20.54 mg/l, the flow rate of 5.57 mL/min, and discs rotational speed of 4.58 rpm for ammonia and COD removal efficiency simultaneously. The maximum removal efficiency of ammonia and COD were obtained at 99.07 % and 85.76 % respectively. Finally, our results suggest that RBC may be considered as a promising method for petroleum refinery wastewater treatment, especially in simultaneously COD and ammonia removal.