Provided are methods for producing mesoporous nanoparticles that can, once loaded, retain small or large molecules (e.g., molecules having a molecular weight that is less or greater than about 900 Da) until release is desired, upon which time the mesoporous nanoparticles can release the loaded molecule in a controlled manner for a desired period of time, including an extended period of time. Also disclosed are methods for treating a subject comprising administering to the subject a mesoporous nanoparticle according to the present disclosure.