In the present study, we developed and optimized an air-agitated liquid–liquid microextraction method, employing the solidification of a floating organic droplet (AALLME-SFO), for the effective and rapid identification of specific steroids in water samples using UPLC-MS/MS. The methodology relies on the utilization of 1-dodecanol as the extractant.Initial microextraction trials were carried out to identify an appropriate study space within the experimental conditions. The factors influencing extraction efficiency, including the type and volume of extractant, sample pH, salt concentration, and centrifugation time, were investigated and optimized using experimental designs. The method was carried out using 1-dodecanol as the extractant solvent, the centrifugation time was 15 min and no requirement for the addition of salt or adjustment of pH. Under optimized conditions, the method exhibited favorable linearity, with correlation coefficients higher than 0.9990. Detection limits fell within the range of 0.0025–0.034 µg/L. The proposed method effectively determined the targeted steroids in water samples, yielding satisfactory recoveries ranging from 90.14 % to 98.90 % and relative standard deviations (RSDs) of ≤ 4.10. The environmental impact of the method was assessed through the Analytical Eco-Scale (AES), Green Analytical Procedure Index (GAPI), and the Analytical GREEnness (AGREE) metric, affirming its ecological compatibility. The AALLME-SFO method, as proposed, offers advantages over established methods for steroid detection in water, such as simple preparation, cost-effectiveness, improved extraction efficiency, and environmental friendliness, establishing it as a practical alternative to conventional methods.