During drilling in deep shale gas reservoirs, drilling fluid losses, hole wall collapses, and additional problems occur frequently due to the development of natural fractures in the shale formation, resulting in a high number of engineering accidents such as drilling fluid leaks, sticking, mud packings, and buried drilling tools. Moreover, the horizontal section of horizontal well is long (about 1500 m), and the problems of friction, rock carrying, and reservoir pollution are extremely prominent. The performance of drilling fluids directly affects drilling efficiency, the rate of engineering accidents, and the reservoir protection effect. In order to overcome the problems of high filtration in deep shale formations, collapse of borehole walls, sticking of pipes, mud inclusions, etc., optimization studies of water-based drilling fluid systems have been conducted with the primary purpose of controlling the rheology and water loss of drilling fluid. The experimental evaluation of the adsorption characteristics of “KCl + polyamine” anti-collapse inhibitor on the surface of clay particles and its influence on the morphology of bentonite was carried out, and the mechanism of inhibiting clay mineral hydration expansion was discussed. The idea of controlling the rheology and water loss of drilling fluid with high temperature resistant modified starch and strengthening the inhibition performance of drilling fluid with “KCl + polyamine” was put forward, and a high temperature-resistant modified starch polyamine anti-sloughing drilling fluid system with stable performance and strong plugging and strong inhibition was optimized. The temperature resistance of the optimized water-based drilling fluid system can reach 180 °C. Applied to on-site drilling of deep shale gas horizontal wells, it effectively reduces the rate of complex accidents such as sticking, mud bagging, and reaming that occur when resistance is encountered during shale formation drilling. The time for a single well to trip when encountering resistance decreases from 2–3 d in the early stages to 3–10 h. The re-use rate of the second spudded slurry is 100 percent, significantly reducing the rate of complex drilling accidents and saving drilling costs. It firmly supports the optimal and rapid construction of deep shale gas horizontal wells.