The present invention discloses a gene carrier and the preparation method thereof. Chondroitin sulfate (CS) is reacted with methacrylic anhydride (MA) to form chrondroitin sulfate-methacrylate (CSMA), which is further covalently bound with polyethylenimine (PEI) via the Michael addition to produce a CSMA-PEI gene carrier. The CSMA-PEI gene carrier can effectively reduce the cytotoxicity of PEI and enhance the transfection efficiency of PEI.