The invention discloses a method and device for preparing garlic oil with racemate alliin as raw materials. The method includes the following steps: (1) loading garlic, green onion, onion or allium chinensis into a reactor after the garlic, the green onion, the onion or the allium chinensis is washed, peeled and triturated, then adding an alliin solution, meanwhile, leading in air, and stirring and/or carrying out the reaction under the ultrasound condition, and (2) adding organic solvents into a reaction system after the reaction begins to carry out continuous extraction, obtaining extracted liquor, then adding edible fat and oil, water, ethyl alcohol or acetic acid into the extracted liquor, enabling the extracted liquor to be concentrated and separated in a vacuum mode at the temperature of 30-100DEG C, and obtaining the garlic oil. According to the method for preparing the garlic oil, the racemate alliin is added in the garlic, alliinase contained in the garlic is used for enabling the alliin to be converted into the garlic oil, the natural attribute of the garlic oil is kept, the yield of the garlic oil can be greatly improved, the method is simple and easy to achieve, and quite remarkable economic benefits are achieved.