The invention discloses a preparation method of a magnetic carbonaceous solid acid catalyst. The method uses waste banana peels as raw materials. First, the banana peel fragments are soaked in a certain concentration of ferric chloride aqueous solution, and after the coordination modification of metal iron ions The iron-based composites that can form porous channels, and then use this composite as a carrier to construct magnetic porous carbon materials, and use the hydrothermal sulfonation method to functionalize the surface of magnetic porous carbon, and finally prepare magnetic carbonaceous solid acid catalyst. The method of the invention is simple and the conditions are mild, and the specific surface area of the obtained magnetic carbonaceous solid acid catalyst is 160-1100m 2 / g, the pore volume is 0.17~0.74cm 3 / g, the average mesopore size is 6.1-11.4nm, and the highest acidity is 2.68mmol H + / g, and has high water resistance, stability, repeatability, and good external magnetic field separation ability, and exhibits extraordinary catalytic activity in the reaction of esterified oleic acid and methanol, and is expected to be used as a high-efficiency catalyst for Preparation of biodiesel by esterification.