We investigate the generalized second law for two-dimensional black holes in equilibrium (Hartle-Hawking) and nonequilibrium (Unruh) with the heat bath surrounding the black holes. We obtain a simple expression for the change of total entropy in terms of covariant thermodynamic variables, which is valid not only for the Hartle-Hawking state but also for the Unruh state up to leading order, without assuming a quasi-stationary evolution of the black holes. Using this expression, it is shown that the rate of local entropy production is non-negative in the two-dimensional black hole systems.