In this study, a rotating microreactor made of Plexiglas was utilized for the removal of methylene blue and methyl oranges from aqueous solutions with these two dyes at different concentrations. To this end, an advanced oxidation process of ultraviolet/hydrogen peroxide/titanium dioxide was performed while setting various conditions for this operation. Box–Behnken experimental design method was implemented to design the experiments. In addition, five variables of initial dye concentration (10, 30, and 50 mg/L), residence time (1, 1.5, and 2 min), hydrogen peroxide concentration (0, 300, and 600 mg/L), titanium dioxide concentration (10, 30, and 50 mg/L), and ultraviolet lamp power (0, 15 and 30 W) were set as the desired variables under the study and a total of 43 tests were performed to remove each dye. Finally, optimal operating conditions for the removal of each of the two items (methylene blue and methyl orange) were obtained. The highest rate of the removal of methylene blue dye (under optimal conditions of initial dye concentration of 36 mg/L, residence time of 2 min, hydrogen peroxide concentration of 235 mg/L, titanium dioxide concentration of 12 mg/L, and ultraviolet lamp power of 30 W) was 99.83% and the highest rate of methyl orange dye removal (under optimal conditions of initial dye concentration of 50 mg/L, residence time of 1.75 min, hydrogen peroxide concentration of 540 mg/L, titanium dioxide concentration of 30 mg/L, and ultraviolet lamp power of 30 W) was 68.69%.