The invention belongs to the field of development of oil, water and gas wells and discloses an underground control system for the oil, water and gas wells. The integral system comprises an RFID (Radio Frequency Identification) passive tag, an RFID reader-writer, a wireless communication coil, a magnetic switch, a battery pack and a driving mechanism. The underground control system not only can be used for controlling connection and disconnection of valves in the oil, water and gas wells, but also can be used for regulating the opening of the valves and can be used for various process control and parameter testing in the production process of the oil, water and gas wells; and if sensors are arranged in valve carriers, information such as the temperature, the pressure and the flow inside the oil, water and gas wells, can be acquired by carrying out writing operation on the RFID electronic tag. The invention overcomes the defects that in the prior art, in the underground harsh environments of high temperature, high pressure, corrosion and the like, the valves cannot be accurately and reliably controlled, the valves are easily operated by mistake, the valves have low reliability in the long-term working process, the construction is complex, the occupied production time is long and the like.