The invention discloses a preparation method of 2,3-dichloropyridine, and aims to solve the problems that a large amount of triethylamine hydrochloride is generated in a reaction process to wrap a palladium-carbon catalyst when a toluene solvent and triethylamine are used as acid binding agents during the preparation of 2,3-dichloropyridine by an existing 2,3,6-trichloropyridine catalytic dechlorination method, so that the activity of the catalyst is not high, the dosage of the catalyst is large, and the reaction selectivity is still not high. In the preparation method provided by the invention, methanol is used as a solvent, the palladium-carbon catalyst with a high water content has good dispersibility in methanol, and the dosage of the palladium-carbon catalyst can be effectively reduced; magnesium hydroxide is used as an acid binding agent, the generated magnesium chloride can be dissolved in methanol, a homogeneous system appears at the later stage of the reaction, and the problemof wrapping the catalyst is avoided; and formic acid is selected as a buffer agent to ensure that formic acid preferentially reacts with magnesium hydroxide to generate magnesium formate dissolved inmethanol, magnesium formate reacts with hydrogen chloride generated in the reaction to generate formic acid and magnesium chloride, and the formic acid realizes a catalytic cycle. The reaction selectivity in the preparation method provided by the invention reaches 85-90% and the yield reaches 87%.