Terahertz (THz) has the characteristics of non ionization, penetration, water absorption, high resolution, etc. It has shown an important application prospect in many fields, such as non-destructive testing, imaging and communication. However, THz is in the transition frequency band ranges from macro-electronics to micro-photonics, so, it belongs to the interdisciplinary field, forming the “terahertz gap” in electromagnetic wave. In recent years, with the continuous development and improvement of THz radiation source and detection technology, the THz modulation technology has gradually aroused the interest of researchers. Metamaterials with many properties that natural materials do not possess provide a common way to control THz. The two-dimensional structure of a metamaterial is called a metasurface. The coding metasurface encodes the phase digitally so that the electromagnetic wave can be regulated. It is proposed that it is first in the microwave band and then extended to the THz band. In the microwave band, the number, direction and amplitude of the far-field beams can be changed dynamically by programming, which is connected with the integrated circuit such as FPGA by using diodes, but due to the limitation of diode size and micro-nano manufacturing technology, the programmable metasurface in microwave band cannot be well used in THz band. In order to improve the flexibility of THz coding metasurface, in this paper we choose the phase change material vanadium dioxide (VO
2) to active modulation coding metasurface. In this paper, we analyze the VO
2’s insulating state before the phase transformation and metallic state after the phase transformation. Then designing an active control 1 bit coding metasurface by using the influence of the two states on the amplitude and phase of the unit structure, which is composed of VO
2, polyimide and aluminum, can not only realize the basic function of coding metasurface adjusting the electromagnetic wave beams, but alsoimplement the switching of two kinds of far-field beams at 1.1 THz for the same coding sequence by thermal stimulated VO
2. The coding metasurface also realizes the switching between two near-field focal points at 1.1 THz for the same coding sequence. Based on the effect of VO
2on the phase, this coding metasurface provides a new way to adjust and control the THz wave flexibly, and will have a great application prospect in THz transmission, imaging and communication.