The invention discloses environment-friendly flame-retardant heat-conducting glue and a preparation method thereof. The preparation method comprises the following steps: diluting a coupling agent by using absolute ethyl alcohol, regulating the pH value of the diluted solution, adding a heat-conducting filler, and mechanically stirring; centrifuging, washing, and drying, thereby obtaining a component A; uniformly mixing an epoxy resin, a curing agent and a curing accelerator by using a high-speed dispersion machine, thereby obtaining a low-viscosity component B; and uniformly grinding and mixing the component A, the component B, an organic phosphorus flame retardant and aluminum hydroxide, vacuumizing, heating the mixture at the temperature of 80-90 DEG C, and heating at the temperature of 130-150 DEG C, thereby obtaining the environment-friendly flame-retardant heat-conducting glue. The environment-friendly flame-retardant heat-conducting glue is low in viscosity, high in heat conductivity coefficient, good in mechanical property and high in acid-base resistance and corrosion resistance, the flame-retardant level reaches UL94V-0, the heat dissipation problem of a general electronic component can be solved; because the heat-conducting glue has good flame-retardant property, when the heat-conducting glue is applied to high-voltage and high-temperature electrical equipment, the on-fire potential safety hazard of the electronic component is effectively reduced.