The demand for oil and natural gas energy is increasing dramatically, and the extraction of conventional oil and gas reservoirs is in a stage of exhaustion. In order to stabilize the functionalized properties of oil-based drilling fluids (OBDF) during the extraction of oil and gas reservoirs in ultra-deep wells, the present experiments were carried out on the material (EG-NIT/CB[7]) obtained by encapsulating nitrate (NIT) in expanded graphite (EG) with porous structure through the supramolecular self-assembly property of cucurbit[7]uril (CB[7]). The structural properties were analyzed using various analytical tools and the results showed that our material synthesis was successful. And the effect of mass fraction of EG, CB[7] on the heat transfer and storage of EG-NIT and EG-NIT/CB[7] materials was investigated. The increase in mass fraction of EG can increase the thermal conductivity of EG-NIT up to 7.4 times and the introduction of CB[7] further improves the thermal conductivity of EG-NIT/CB[7] by up to 1.38 W/m·k. The latent heat value of EG-NIT/CB[7] decreased by only 4.7% after 200 cycles. Meanwhile, under the condition of 150 °C, adding EG-NIT/CB[7] to drilling fluids can reduce the temperature of drilling fluids by 2.8 °C. And it improves the stability of drilling fluids, the viscosity almost does not change, and it can also play a certain role in inhibiting the leakage of drilling fluids. Therefore, the EG-NIT/CB[7] developed by us can be practically applied in ultra-deep drilling projects.