This study synthesized mesoporous magnetic Fe3O4 nanoparticles with two pore sizes. First, two different pore sizes of SiO2 were synthesized using polyethylene glycol with molecular weights of 6000 kDa and 35,000 kDa. Next, mesoporous SiO2 was used as a template, and Fe3O4 was coated with a precursor. Then, the silica present in mesoporous SiO2 was leached. The adsorption capacities of the prepared mesoporous magnetic Fe3O4-NPs were compared using an azo cationic dye, Basic Red 18. Parameters such as solution pH, adsorbent amount, and dye concentration were optimized in the adsorption experiments. Additionally, the reusability of Fe3O4-NPs was investigated. The optimum conditions for P6-Fe3O4-NPs were the original pH, 0.5 g/L dose, 50 ppm dye concentration, 60 min contact time, and 100% removal efficiency. For P35-Fe3O4-NPs, the optimal conditions were original pH, 0.75 g/L dose, 20 ppm dye concentration, and 60 min of contact time, with 100% removal efficiency. The second-order kinetic model and Langmuir isotherm were found to be suitable for describing the adsorption of both nanoparticles. Under the optimum conditions, complete dye removal efficiency was achieved for both nanomaterials. Furthermore, in the real wastewater, the adsorption experiment utilizing P6-Fe3O4-NPs yielded a 98% efficiency in color removal at 620 nm.