In the paper we investigate the regularity of the value function representing Hamilton–Jacobi equation: − Ut + H(t, x, U, − Ux) = 0 with a final condition: U(T,x) = g(x). Hamilton–Jacobi equation, in which the Hamiltonian H depends on the value of solution U, is represented by the value function with more complicated structure than the value function in Bolza problem. This function is described with the use of some class of Mayer problems related to the optimal control theory and the calculus of variation. In the paper we prove that absolutely continuous functions that are solutions of Mayer problem satisfy the Lipschitz condition. Using this fact we show that the value function is a bilateral solution of Hamilton–Jacobi equation. Moreover, we prove that continuity or the local Lipschitz condition of the function of final cost g is inherited by the value function. Our results allow to state the theorem about existence and uniqueness of bilateral solutions in the class of functions that are bounded from below and satisfy the local Lipschitz condition. In proving the main results we use recently derived necessary optimality conditions of Loewen–Rockafellar [P.D. Loewen and R.T. Rockafellar, SIAM J. Control Optim. 32 (1994) 442–470; P.D. Loewen and R.T. Rockafellar, SIAM J. Control Optim. 35 (1997) 2050–2069].