The low-cost mesoporous silica nanoparticles were successfully prepared from naturally occurring diatomite. The resultant samples were tested in the adsorption of methylene blue (MB) from aqueous solution. The effect of various adsorption parameters including initial pH, adsorbent dose and contact time was examined. The experimental data obtained with mesoporous silica were well fitted with both the pseudo-second-order kinetic and Langmuir models; and thermodynamic calculations showed that the removal of MB onto mesoporous silica was a spontaneous and exothermic process. The maximum adsorption amount of MB onto mesoporous silica reached 347.2 mg g−1. Moreover, mesoporous silica could be effectively regenerated by simple heating treatment and reused five cycling runs without significant loss of adsorption capacity. 27Al NMR results indicated aluminum was mainly incorporated into the framework. XPS studies also confirmed the presence of Fe2O3 in the adsorbent. Mesoporous silica prepared from inexpensive raw material was found to a potential adsorbent towards the removal of MB owing to its easy recovery and eco-friendliness.