Shale wellbore instability due to hydration significantly hinders the efficient extraction of clean shale gas resources, making the development of effective shale stabilizers for safe drilling in shale reservoirs an urgent priority. In this study, we proposed an innovative application of hydrophobic ionic liquids functionalized nano-SiO2 (ILs@SiO2) specifically designed to maximize hold wellbore strength and effectively inhibit shale hydration. The chemical composition and microstructure of ILs@SiO2 were characterized, and their effects on wellbore stability were thoroughly investigated along with the underlying mechanisms. The shale stabilizer demonstrated significant clay swelling inhibition (9.5 %), as well as effective hydration and dispersion inhibition of shale cuttings at 150 °C (88.0 %), and a reduced spontaneous imbibition of shale (0.997 g). Particularly, ILs@SiO2 maximized maintained wellbore strength (203.4 MPa) and minimized water invasion (5.5 mL). Mechanism analysis revealed that ILs@SiO2 improved wellbore stability through electrostatic adsorption weakening osmotic hydration, physical plugging establishing a dense preventing water barrier, altering wettability decreasing rocks surface free energy, inhibiting surface hydration, and reversing the direction of capillary forces. This study offers new strategies and insights for constructing methods to plug shale nanopores and inhibit surface and osmotic hydration.