The invention discloses a drilling fluid and a preparation method thereof. The drilling fluid comprises, by weight, 2.0 to 6.0 parts of bentonite, 0.1 to 1 part of sodium carboxymethylcellulose, 0.2 to 0.8 part of a zwitter-ion sulphonate copolymer, 0.03 to 0.4 part of sodium hydroxide, 0.1 to 0.8 of a polyamine polymer, and 100 parts of water; the polyamine polymer is a polymer of terminal diamine, a cyclic ether, and an epoxy alkyl halide. The preparation method comprises following steps: the polyamine polymer is prepared firstly, wherein the polyamine polymer is prepared via copolymerization of terminal diamine, the cyclic ether, and the epoxy alkyl halide; and then an aqueous solution containing bentonite, sodium carboxymethylcellulose, the zwitter-ion sulphonate copolymer, sodium hydroxide, the polyamine polymer, and water is prepared according to the stoichiometric ratio so as to obtain the drilling fluid. The drilling fluid is excellent in system inhibition performance and collapse resistance, and contains no sylvite, so that subsequent processing on high salt content is unnecessary.