The invention discloses a method of uplink and downlink message routing of a service gateway of internet of things, wherein the method of uplink message touting include: enabling a terminal to send an uplink message to a terminal access-in adaptation layer subsystem; analyzing a terminal protocol by the terminal access-in adaptation layer subsystem, and enabling the uplink message to be changed into an interior message of the service gateway of the internet of the things and sent to a routing control module of a core layer subsystem; enabling the routing control module to query a routing table, and enabling the uplink message to be sent to a corresponding network element according to different order relationship; and enabling a capability gateway module and a real-time data distributing module to supply the received uplink message for an application subsystem to apply. The technical scheme is adopted, the method of the uplink and downlink message routing of the service gateway of the internet of things is elastic and flexible in framework, good in expansibility, capable of achieving multi-granularity order relationship, wide in application, good in application and customization capability and beneficial for the application and development.