TECHNOLOGY FOCUS - ORGANIC CHEMISTRY - Preparation (claimed): The preparation method of the hydroxyl anion resin containing imidazole structure comprises swelling chloromethylated styrene-divinylbenzene copolymer and N,N-dimethylformamide according to the mass-to-volume ratio of 1:2; putting on the magnetic stirrer to carry out stirring for 2 hours; adding N-methylimidazole; where the mass ratio of the methylimidazole to chloromethylated styrene-divinylbenzene copolymer is 2:1 to 1 2; heating at 40 degrees C to reflux for 72 hours in water bath; after reacting, filtering the resin, using ethanol to wash the resin, drying the resin, obtaining chlorine anion resin with imidazole structure; further using methanol solution of sodium hydroxide (NaOH) to exchange anion with the chlorine anion resin with imidazole structure, and obtaining hydroxyl anion resin containing imidazole structure; where the adding amount of the methanol solution of NaOH is determined by that the mol ratio of the chloride ion (Cl-) in the hydroxyl anion resin containing imidazole structure to NaOH is 1:10 to 1:30. Preferred Process: Utilizing the hydroxyl anion resin containing imidazole structure for preparing biodiesel comprises adding soybean oil and methanol to the reactor according to the mol ratio of 1:6 to 1:20; adding hydroxyl anion resin containing imidazole structure as catalyst; where the mass ratio of the hydroxyl anion resin containing imidazole structure to soybean oil is 0.5:100 to 10:100; after heating at 40-60 degrees C, stirring at constant temperature to reflux for 8 hours; after finishing the reaction, filtering the product and recovering ROH; letting it stand to stratify, and obtaining biodiesel; where the hydroxyl anion resin containing imidazole structure can be reused by regeneration as catalyst; where the regeneration process comprises after using hydroxyl anion resin containing imidazole structure completely as catalyst; filtering out the resin; using methanol to wash the product; making the resin soak to the NaOH methanol for 24 hours; using methanol to wash the resin and drying the resin, and obtaining hydroxyl anion resin containing imidazole structure; where the dosage of the NaOH methanol solution is based on the mol ratio of the alkali site of the hydroxyl anion resin containing imidazole structure to NaOH that is 1:10 to 1:30.