Lost circulation usually occurs when drilling fracture formations using oil-based drilling fluids (OBDFs). This study synthesized the shape memory epoxy resins (EHN) with a glass transition temperature range of 94–122 °C. They exhibited good thermal stability and dynamical mechanism performance. The EHN did not swell in oil at different temperatures; however, its shape changed with temperature. Optimized by an orthogonal experiment, the thickness swelling rate prepared under the optimal conditions was more than 74%. The particle size reduction rate did not exceed 5% after aging at 150 °C in oil, which was less than 1/4 of that of the nutshell. The EHN1 with a glass transition temperature of 122 °C, prepared under the optimal conditions (OEHN1), was utilized to control lost circulation in OBDF at high temperatures. At a heating rate of 1–10 °C/min, the shape memory rate of OEHN1 required 14–107 min to reach 100% in the temperature range of 30–150 °C, respectively. The shape memory recovery rate of OEHN1 reached to 10, 28, 57, and 97% at 80, 100, 120, and 125 °C within 60 min, respectively. In addition, it required 4–10 min to recover to 100% at 135–150 °C, respectively. OEHN1 did not recover below 80 °C, partially recovered between 80 and 120 °C, and completely recovered above 125 °C (>glass transition temperature). When plugging the wedge fracture with inlet/outlet fracture widths of 3/1 mm at 80–150 °C, formula 2 (F2) containing OEHN1 exhibited lower fluid loss and stabler pressure-bearing capacity under 15 MPa. When plugging the wedge fracture with inlet/outlet fracture widths of 4/2 mm, F2 withstood a pressure of 5 MPa at 80 °C and 15 MPa at 120 °C and 150 °C. Further, OEHN1 exhibited excellent temperature responsiveness and plugging performance. They transformed from the glassy to rubber state following full activation at 125–150 °C. They became elastic particles, expanded from flakes to cubes, and could adapt to different crack sizes. In addition, they bridged, accumulated, filled, and formed compact cracks with other lost circulation materials. Consequently, they formed a force-chain network that improved the stability of the plugging layer.