The invention discloses a formula and a preparation method of a mosquito-repellent liquid capable of repelling mosquitoes, killing bacteria and purifying air. The mosquito-repellent liquid comprises the following raw materials in parts by weight: 0.5-28 parts of glucoside, 12 to 40 parts of ethanol, 0.12 to 20 parts of an eucalyptus extract, 0.12 to 20 parts of citronella extract and 46 to 89 parts of distilled water; or 0.5 to 28 parts of Tween 20-100, 12 to 40 parts of ethanol, 0.12 to 20 parts of the eucalyptus extract, 0.12 to 20 parts of Melaleuca alternifolia extract, 0.12 to 20 parts ofcitronella extract and 46-89 parts of distilled water. The mosquito-repellent liquid provided by the invention has remarkable mosquito repellent effect and is safe and pollution-free; a eucalyptus isrich in aromatic oil, has killing or repelling effect on various germs and pests, and can be made into insecticides, preservatives, mosquito-repellent oil and the like; and in addition, a certain bactericidal effect is achieved, and the breeding and spreading of pathogenic bacteria carried by mosquitoes can be reduced. The mosquito-repellent liquid is prepared from plant essential oil, does not contain artificially synthesized essence, preservatives and chemical pigments, smells pleasant and is beneficial to physical and psychological health. The components of the mosquito-repellent liquid are environmentally friendly and low in cost, and the mosquito-repellent liquid produces good social, ecological and economic benefits.