A time-dependent HermiteGalerkin spectral method (THGSM) is investigated in this paper for the nonlinear convectiondiffusion equations in the unbounded domains. The time-dependent scaling factor and translating factor are introduced in the definition of the generalized Hermite functions (GHF). As a consequence, the THGSM based on these GHF has many advantages, not only in theoretical proofs, but also in numerical implementations. The stability and spectral convergence of our proposed method have been established in this paper. The Kortewegde VriesBurgers (KdVB) equation and its special cases, including the heat equation and the Burgers equation, as the examples, have been numerically solved by our method. The numerical results are presented, and it surpasses the existing methods in accuracy. Our theoretical proof of the spectral convergence has been supported by the numerical results.