Understanding the indeterministic phenomena in a deterministic nonlinear system has been an implicit dream since Lorenz named it the "butterfly effect". A prototypical example is the hysteresis and bistability of a Duffing oscillator, which is traditionally attributed to the competition between two strange attractors corresponding to two coexisting steady states in a double-well potential. However, this interpretation fails in a quantum-mechanical perspective where only one steady state is allowed in the whole parameter space. Here, we measure the non-equilibrium dynamics of a superconducting Duffing oscillator and reconcile the classical and quantum theories in a unified picture. We demonstrate that the traditionally regarded steady states are in fact metastable states, which have a remarkably long lifetime but should eventually relax to the unique and non-classical steady state allowed by quantum mechanics. Hence the hysteresis and bistability are measurement outcomes of the system in different relaxation stages. By engineering the metastability lifetime increasingly large, we observe a first-order dissipative phase transition which simulates a sudden change of the photon density in a 11-site driven-dissipative Bose-Hubbard lattice. We also reveal the microscopic picture of the transition process by quantum state tomography. Our results provide a comprehensive understanding of the Duffing oscillator and reveal the quantum-mechanical origin of its well-known chaotic behaviors. They form an essential step towards understanding chaos and should stimulate interest in exploring non-equilibrium physics in driven-dissipative systems.