Nanosealing technology has become the key to overcoming the wellbore instability problem in deep and ultradeep shale formations. In this Article, the terpolymer poly(MM-EM-BM) was synthesized from methyl methacrylate, ethyl methacrylate, and butyl methacrylate by a Michael addition reaction. The poly(MM-EM-BM) nanoparticles were investigated by Fourier transform infrared spectroscopy, laser scattering analysis, and thermogravimetric analysis. The results imply that the particle size range of poly(MM-EM-BM) is between 33.90 and 135.62 nm and the average diameter is about 85.95 nm at room temperature, which can maintain excellent stability at 382.75 °C. The effects of poly(MM-EM-BM) on the properties of oil-based drilling fluids (OBDFs) were ascertained through experiments on the rheological performance, electrical stability, and high-temperature and high-pressure (HTHP) filtration loss. The results suggested that when the amount of added poly(MM-EM-BM) increases, the apparent viscosity, plastic viscosity, dynamic shear force, and demulsification voltage of the drilling fluids will increase correspondingly; in contrast, the HTHP filtration loss gradually decreased. When poly(MM-EM-BM) is added at 0.75%, the kinetic-to-plastic ratio of the drilling fluids is 0.24 and the filtration loss is 0.6 mL, showing excellent overall performance. The drilling fluids have a good rock-carrying ability and water loss wall-building property. The sealing performance and mechanism of poly(MM-EM-BM) were researched by the method of a sealing performance test under high temperature. The results indicated that the more poly(MM-EM-BM) used, the higher the sealing efficiency of the mud cake and the core as the sealing medium. When poly(MM-EM-BM) was added at 0.75%, the sealing rates of the mud cake and the core as the sealing medium reached the maximum sealing rates of 40.30% and 91.48%, respectively. When poly(MM-EM-BM) enters the core nanopore joint for a certain distance under formation pressure, a tight sealing layer will be formed to effectively prevent the entry of filtrate. Poly(MM-EM-BM) as a potential oil-based nanosealing agent is expected to solve the problem caused by wellbore instability in shale horizontal wells.