Profile modification is the key for efficient development of oil and gas reservoirs, especially high‐temperature reservoirs, which requires the system to have good high‐temperature resistance. According to the characteristics of high‐temperature reservoir, a high temperature gel composed of terpolymer, modified phenolic resin, aromatic amine curing agent and thiourea was developed. The effects of different components on the properties of the gel system were clarified. Then, the long‐term thermal stability under high‐temperature conditions was studied. In addition, the plugging performance of gel system under different permeability and injection volume was studied. Finally, the gelation properties and plugging properties of gel system with the flow distance were studied by simulating the flow of porous media. The results show that the gel system has high strength and suitable gelation time, and it can be adjusted in real time according to different oilfield requirements. In the range of 75–150°C, the gel system had excellent long‐term stability. When the temperature was 75°C, no free water after 120 days, and the viscosity only decreased from 13,131 to 11,254 mPa·s. Even at 150°C, the viscosity was as high as 8350 mPa·s after 120 days, and the free water was only 5.5%. The gel system had good adhesion ability on the porous media surface and strong anti‐flooding properties. When the injection volume was 0.1 pore volume (PV in short), the plugging rate to the sand packed tube was 72.7%. When the injection volume was 0.5 PV, the plugging rate was as high as 97.6%. The plugging rate of the gel system for the sand packed tube with permeability of 500 mD was 98.7% when the injection volume was 0.5 PV. When the permeability increased to 3000 mD, the plugging rate still reached 92.3%. The gel system also had an excellent deep profile control ability, and the viscosity retention of at 60 cm was as high as 96%. When the flow distance was 2 m, the viscosity retention also reached 75%. The rheological properties also shown that the gel system had excellent shearing resistance and adsorption resistance. Finally, combined with the state of the gel system on the surface of the porous media, there was no cementation between the formation sand before the injection, and the sand particles did not stick to each other. After the gel was injected, the adhesion of gel system on the porous media surface was very strong. The 3D network structure was also very dense, the sand particles could have good cementation effect under the adhesion of gel system.