The invention relates to a preparation method of chitosan, which comprises the following steps of: screening, purifying, dicing, washing and drying shrimp shells and crab shells, soaking with an appropriate amount of hydrochloric acid for 5-8h, after filtering, recovering a calcium chloride solution, collecting the preliminarily decalcified shrimp shells and crab shells, soaking with excessive hydrochloric acid, collecting the decalcified shrimp shells and crab shells, boiling with a sodium hydroxide solution, cooling, then filtering, recovering the sodium hydroxide solution after filtration, obtaining the shrimp shells and crab shells having protein removed, removing water, soaking with potassium permanganate, soaking a filtration product in a reducer solution after filtration till complete decoloration, washing with water, drying to form chitin, soaking the chitin with sodium hydroxide for 15-20 h at 80-100 DEG C, cooling, filtering, cleaning a filtration product, removing residual sodium hydroxide, drying, and grinding to form the chitosan. The preparation method realizes high resource utilization rate, low production cost and low environmental pollution by recycling materials.