Glucocorticoids have a certain whitening effect on the skin. However, frequent and long‐term use of cosmetics including glucocorticoids is harmful to health. Herein, we proposed a novel micro‐solid phase extraction method for the detection of prednisolone acetate, prednisone, and prednisolone in cosmetics coupled with high‐performance liquid chromatography. In this method, porous monolithic polymer micro‐extraction bars were prepared by “one‐step, one‐pot” in situ photopolymerization combined with sacrificial support in hollow fiber under water atmosphere. The crucial factors such as pH of sample solution, extraction, and elution times that influence micro‐extraction were optimized and found to be 9.0, 2 h, and 32 min, respectively. Under the optimum experimental conditions, the linear range of the calibration curves were from 5.0 to 2000 µg/L with correlation coefficients (R2) between 0.9922 and 0.9996. The limit of detection and limit of quantification were 1.5 µg/L and 5.0 µg/L, respectively, and the recoveries were found to be in range of 69.0–113.3%. The analysis of precision for intraday and interday were less than 10.40 and 10.59%. The device has been successfully achieved photopolymerization under water atmosphere. The results indicated that this method is simple, accurate, and satisfactory for the pretreatment and determination of glucocorticoids in complex cosmetics samples.