Liquid-liquid microextraction method based on supramolecular solvent was proposed for analysis of dinitroaniline herbicides (pendimethalin and trifluralin) residue in water and onion samples. In the present method, reverse micelles of undecanol (250 mg 1-undecanol) dispersed in tetrahydrofuran and water was used as supramolecular solvent. The parameters affecting the extraction efficiency of herbicides like pH, amount of 1-undecanol, percentage of tetrahydrofuran (THF), composition, volume of supramolecular solvent and vortex time were studied. At optimum conditions, the linear range for both herbicides was from 0.03 to 100 mgL-1. The method was found selective for determination of dinitroaniline herbicides in the presence of coextractants of onion samples. The percentage recoveries were found 97.5-100% and 91.2-95.2% for water and onion samples, respectively. Limit of detection (S/N=3) of pendimethalin and trifluralin was in the range of 3.0-5.5 µgL-1 for water samples and 7-11 µgL-1 for onion samples. Preconcentration factor was found to be 63. Calculated analytical eco-scale value (>75) for the proposed method fulfilling principles of green analytical chemistry. © 2021 Informa UK Limited, trading as Taylor & Francis Group.