The invention discloses a biosynthesis method of L-carnitine. The biosynthesis method comprises: 1) dissolving a substrate ethyl 4-chloroacetoacetate in a MOPS buffer solution, adding ketoreductase-containing engineering bacteria whole cells, coenzyme, butylene glycol, a surfactant and an additive, and carrying out a reaction to generate (R)-4-chloro-3-hydroxy-butyric acid ethyl ester, wherein thepH value is controlled at 6.5-7.5; and 2) dissolving sodium hydroxide in a trimethylamine aqueous solution with a mass ratio of 25% to form a mixed solution, slowly adding the mixed solution to the (R)-4-chloro-3-hydroxy-butyric acid ethyl ester generated in the step 1) at a temperature of -5-5 DEG C in a dropwise manner, carrying out a reaction for 20-30 h at a temperature of -5-5 DEG C, stopping the reaction, adjusting the pH value to 5-7, and purifying to obtain L-carnitine. According to the present invention, the biosynthesis method has characteristics of strong stereoselectivity, mild reaction conditions, low cost, low pollution, high efficiency, high yield and high optical purity of the product.