Combining the electroweak phase transition and the Higgs searches at the LHC, we study the Higgs inflation in the type-I and type-II two-Higgs-doublet models with nonminimally couplings to gravity. Considering relevant theoretical and experimental constraints, we find that the Higgs inflation imposes stringent constraints on the mass splitting between A, H ± , and H, and they tend to be nearly degenerate in mass with increasing of their masses. The direct searches for Higgs at the LHC can exclude many points achieving Higgs inflation in the region of m H (m A ) < 450 GeV in the type-I model, and impose a lower bound on tan β for the type-II model. The Higgs inflation disfavors the wrong sign Yukawa coupling region of type-II model. In the parameter space achieving the Higgs inflation, the type-I and type-II models can produce a first order electroweak phase transition, but v c /T c is much smaller than 1.0.