The realization of high-efficient digestion in a microfluidic reactor is considered to be advantageous for pretreatment toward online pollutant detection. However, it is difficult to achieve satisfactory device performance due to the gap between the low digestion reaction efficiency and the demand for rapid pretreatment for online detection. Herein, we design and manufacture an optofluidic microreactor combined with a MnO 2 nanofilm localizing the heat inside the reaction chamber under solar irradiation, which contributes a lot to the on-chip nutrient digestion efficiency enhancement. The overall temperature of the water sample in the reactor chamber can be dramatically increased in a fleeting time of less than 1 s and maintained at 78 °C. The digestion rate constant of the microreactor is improved by about 100 times compared with that obtained by the traditional method in the national standard, which is attributed to temperature enhancement and various oxidation reactions in the heated reaction chamber. Notably, when pretreating the actual total phosphorus water samples, the digestion efficiency is demonstrated to be higher than 95% within 12 s under solar light irradiation. The optofluidic platform brings many benefits to accelerate the various photochemically enhanced reactions using solar light and is extremely adapted for rapid pretreatment of biochemical samples to further develop their online analysis.