The invention provides a method for realizing edge control in an Internet of Things gateway. The method is provided with a system architecture composed of a cloud server and an Internet of Things gateway. The cloud server is used for configuration management, state monitoring and remote control of the Internet of Things gateway, the controlled equipment and the sensor; the Internet of Things gateway is used for realizing protocol conversion, data analysis and edge control functions in a control process, the Internet of Things gateway comprises a controller part and a collector part, and the controller part comprises a control configurator, a control scheduler, an input device, a control machine and an actuator. According to the method, a parameterized control algorithm is built in an Internet of Things gateway; The control logic is placed in the Internet of Things gateway close to the controlled device, the specific device is dynamically bound through the configuration means, differentcontrol instructions are called, and therefore universal device control on the edge side is achieved on the basis of the Internet of Things gateway, real-time control and remote control over the device can be facilitated through the method, expandability is high, and remote control is convenient.