Aiming at the problem that the location of the secondary base station affects the interference between the primary and secondary systems directly and the reasonable allocation of channel resources, an Internet of Things (IoT) sensor network resource allocation scheme using an improved chaotic firefly algorithm is proposed. This solution builds a multi-objective optimization model based on interference analysis of the working scenario of the cognitive radio. The goal is to protect the primary user’s normal activity to maximize the throughput of the secondary system and maximize the number of users that can be covered by the secondary base station. Because the multi-objective model is a non-linear convex optimization problem, the paper uses an improved chaotic firefly algorithm to solve it. Chaos algorithm is introduced into the firefly algorithm. By perturbing individuals, the convergence speed is accelerated and the probability of local optimization is reduced. The algorithm can efficiently obtain the optimal solution while reducing the complexity of the problem. The simulation results show that the method proposed in this paper can optimize the performance of the secondary system while guaranteeing the priority of the primary user. And it is superior to several advanced algorithms.