A heterogeneous cognitive wireless sensor network clustering routing method relates to the technical field of wireless sensor networks, solves the problems of high energy consumption, short network life cycle, spectrum resource shortage and hardware condition limitation of a wireless sensor network, and comprises the following steps: randomly deploying cognitive nodes and common nodes; judging whether the residual energy of the cognitive node is greater than Emax, if so, forming a cluster head, otherwise, judging whether the residual energy of the cognitive node is less than Emin, if not, exiting, otherwise, randomly selecting a number between [0, 1], comparing the number with the cluster head selection probability, if so, exiting, and otherwise, forming the cluster head; and the non-cluster head node selecting the cluster head to enter the cluster according to the energy magnification times under the free transmission mode and the multipath transmission mode, the distance from the non-cluster head node to the base station and the distance from the non-cluster head node to the cluster head, and determining the cluster head selection probability according to the number of spare channels and the marginal degree. According to the invention, the network energy consumption is reduced, the network life cycle is prolonged, the frequency spectrum shortage is relieved, and the problem of high hardware requirement is avoided.