The Internet of Things (IoT) is a novel concept in the technology and communication world. Briefly, the “Internet of Things” is a modern technology in which any entity such as humans, animals, or objects can transmit data through communication networks like, the Internet or the Intranet. These networks have very important challenges such as energy consumption, and fast and reliable data transmission due to their heterogeneous and dynamic nature. In this paper, we propose a two-level clustering based on fuzzy logic and content-based routing method. In the first level clustering, several parameters are applied: energy, node capacity, and number of neighbors. Also, in the second level clustering, the centrality formula has been used to select super cluster head nodes. In the proposed routing process, we divide data into two types: high-volume data and low-volume data, and the routing process is performed based on the data type. We simulate the proposed method using MATLAB software. Then, simulation results are compared with the different schemes including, HEED, FLCFP, FBCFP, and ELCP. Experiments show that the proposed method outperforms others in terms of average energy consumption, the number of alive nodes, network lifetime, and packet delivery rate.