The invention provides a wireless sensor network routing method based on the improved harmony search algorithm. The method comprises the following steps: 1, initializing relevant parameters HMS, HMCR and PAR of the algorithm and the evaluation time eval-Nomax; 2, utilizing a roulette to initialize a harmony memory bank HM; 3, evaluating the fitness of harmony paths in the harmony bank; 4, setting eval-No to be equal to 0; 5, setting i to be equal to 0; 6, generating candidate harmony; 7, setting eval-No to be ++, and executing the step 8 if eval-No is smaller than eval-Nomax, or else executing the step 11; 8, carrying out neighborhood search on the ith harmony Xi equal to (s, x2, ...xj, ..., d); 9, setting eval-No to be ++, and executing the step 10 if eval-No is smaller than eval-Nomax, or else executing the step 11; 10, setting i to be ++, executing the step 6 if i is smaller than HMS, or else executing the step 5; 11, recording the optimum harmony path in the harmony memory bank. The routing method has high energy efficiency and can effectively prolong the life cycle of the whole network.