In this paper, we study the phase transition of the two Higgs-doublets model (2HDM) and consider a scenario of a electroweak phase transition at alignment limit. Using the Cornwall–Jackiw–Tomboulis formalism at finite temperature, we consider the phase transition of the aligned 2HDM in the two-loop double-bubble contribution. By requirement of Goldstone theorem, the effective potential is corrected and the results show that the system obeys a second-order phase transition. A possible thermal history of the early universe has been treated out: the universe undergoes a smooth crossover in the SM, a second-order phase transition in this model before going to a strong first-order transition in the new physics as in recent 2HDMs and supersymmetry (from the EW symmetric to the broken phase).