The interplay of quantum information theory and condensed matter physics has generated fruitful results, which promote our understanding of quantum phase transition. Magic, as a crucial resource in fault-tolerant quantum computation, may provide new insights into quantum phase transition. Based on quantum renormalization group method, we investigate the role magic plays in detecting quantum phase transition in the one-dimensional anisotropic XXZ model and XY model. The quantifier of magic we employed is defined via the characteristic functions of quantum states; it not only has nice properties, but also can be straightforwardly calculated. As the iteration steps of quantum renormalization group increase in the spin models, the magic quantifier achieves its maximum, while the first-order derivative of the magic is discontinuous around the critical points, which are signatures of quantum phase transition. The scaling behavior of the renormalized magic in terms of the system size is demonstrated, and a comparative study with coherence is made.