Abstract Hyperbolic partial differential equations with an integral condition serve as models in many branches of physics and technology. Recently, much attention has been expended in studying these equations and there has been a considerable mathematical interest in them. In this work, the solution of the one-dimensional nonlocal hyperbolic equation is presented by the method of lines. The method of lines (MOL) is a general way of viewing a partial differential equation as a system of ordinary differential equations. The partial derivatives with respect to the space variables are discretized to obtain a system of ODEs in the time variable and then a proper initial value software can be used to solve this ODE system. We propose two forms of MOL for solving the described problem. Several numerical examples and also some comparisons with finite difference methods will be investigated to confirm the efficiency of this procedure.