We study a finite horizon problem for a system whose evolution isgoverned by a controlled ordinary differential equation, which takesalso account of a hysteretic component: namely, the outputof a Preisach operator of hysteresis. We derive a discontinuousinfinitedimensional Hamilton–Jacobi equation and prove that, under fairlygeneral hypotheses, the value function is the unique bounded anduniformly continuous viscosity solution of the corresponding Cauchyproblem.