We use an alternative method to investigate the quantum criticality at zero and finite temperature using trace distance along with the density matrix renormalization group. It is shown that the average correlation measured by the trace distance between the system block and environment block in a DMRG sweep is able to detect the critical points of quantum phase transitions at finite temperature. As illustrative examples, we study a spin-1 XXZ chains with uniaxial single-ion-type anisotropy and the Heisenberg spin chain with staggered coupling and external magnetic field. It is found that the trace distance shows discontinuity at the critical points of quantum phase transition and can be used as an indicator of QPTs.