An extraction method based on metal-organic framework has been developed and applied to acetanilide herbicides, including metazachlor, propanil, pretilachlor, and butachlor, in black beans, red beans, and kidney beans. The acetanilide herbicides are extracted with a mixture of ethyl acetate and n-hexane. The extract solution is absorbed and purified with metal-organic framework MIL-101 (Zn). The separation and determination of four acetanilide herbicides were implemented by high-performance liquid chromatography. The experimental parameters were evaluated by a univariate method and orthogonal experiments. The presented method can obtain effective extraction and purification. The detection limits for metazachlor, propanil, pretilachlor, and butachlor were 0.58, 0.90, 1.78 and 1.18 mu g/kg, respectively. The average recoveries of the acetanilide herbicides at spiked concentrations of 10, 50, and 100 mu g/kg ranged from 86.9% to 119.0%, and relative standard deviations were equal to or lower than 2.80%.