An optimal control problem of a first-order hyperbolic system is studied, in which a boundary condition at one of the ends is determined from a controlled system of ordinary differential equations with constant state lag. Control functions are bounded and measurable functions. The system of ordinary differential equations at the boundary is linear in state. However the matrix of coefficients depends on control functions. Therefore, the optimality condition of Pontryagin’s maximum principle type in this problem is a necessary, but not a sufficient optimality condition. In this paper, the problem is reduced to an optimal control problem of a special system of ordinary differential equations. The proposed approach is based on the use of an exact formula of the cost functional increment. The reduced problem can be solved using a wide range of effective methods used for optimization problems in systems of ordinary differential equations. Problems of this kind arise when modeling thermal separation processes, suppression of mechanical vibrations in drilling, wave processes and population dynamics.