The Kibble-Zurek mechanism (KZM) captures the key physics in the non-equilibrium dynamics of second-order phase transitions, and accurately predict the density of the topological defects formed in this process. However, despite much effort, the veracity of the central prediction of KZM, i.e., the scaling of the density production and the transit rate, is still an open question. Here, we performed an experiment, based on a nine-stage optical interferometer with an overall fidelity up to 0.975$pm$0.008, that directly supports the central prediction of KZM in quantum non-equilibrium dynamics. In addition, our work has significantly upgraded the number of stages of the optical interferometer to nine with a high fidelity, this technique can also help to push forward the linear optical quantum simulation and computation.