In drilling in a tight oil reservoir, wellbore instability can lead to serious drilling complex accidents and significant increases in drilling costs. An accurate geomechanical model can provide technical support for drilling operations. A 3D geomechanical model of the well area is constructed based on a seismic-based structural 3D model and incorporates geomechanical properties and pressure profiles of adjacent wells. The 3D geomechanical model can help identify areas of borehole instability caused by abnormal formation pressure, shaft wall collapse, and other complicated drilling problems. When a 3D geomechanical model is used in real-time drilling, the non-production time due to complexity is significantly reduced compared with the adjacent wells. This method provides a convenient means for optimizing drilling fluid density and risk assessment in Mahu Oilfield, Junggar Basin, and provides guidance for reducing drilling risk and improving drilling performance.