We reveal a prethermal dynamical regime upon suddenly quenching to the vicinity of a quantum phase transition in the time evolution of one-dimensional spin chains. The prethermal regime is analytically found to be self-similar and its duration is governed by the ground-state energy gap. Based on analytical insights and numerical evidence, we show that this dynamical regime universally exists independently of the location of the probe site, the presence of weak interactions, or the initial state. The resulting prethermal dynamics leads to an out-of-equilibrium scaling function of the order parameter in the vicinity of the transition. Our theory suggests that sudden quench dynamics, besides probing quantum phase transitions, may give rise to a universal critical slowing down near the critical point.