3D NoC has the advantages of low communication delay, low power consumption and high data throughput, but, at the same time, suffers from heat dissipation problem. We propose the concept of temperature gradient as the basis for 3D NoCs routing. By monitoring the temperature of every node, the run-time temperature management (RTM) can calculate the temperature gradient map, and the routing decision can be made by choosing the coolest path for routing. Experiments show that the proposed approach has not only has shorter packet delay (17% improvement) and higher throughput (19.2% improvement), but also lower average temperature (decreased by 2.81oK) than the Edge routing algorithm.