In the $U(1)_X$ extension of the minimal supersymmetric standard model, we study a two step phase transition for the universe. The first step happens at high temperature from origin to z coordinate axis. The second step is the electroweak phase transition(EWPT) with barrier between two minima, which is the first order EWPT. We study the condition for this type phase transition to occur. The strong first order EWPT is our expection, and with the supposed parameters the evolution of the universe is plotted by the figures.