We consider the Cauchy problem in a Hilbert space for a second-order abstract quasilinear hyperbolic equation with variable operator coefficients and nonsmooth (but Bochner integrable) free term. For this problem, we establish an a priori energy error estimate for the semidiscrete Galerkin method with an arbitrary choice of projection subspaces. Also, we establish some results on existence and uniqueness of an exact weak solution. We give an explicit error estimate for the finite element method and the Galerkin method in Mikhlin form.Keywords: second-order hyperbolic equation, the Galerkin method, error estimate, weak solution, existence and uniqueness of a solution, finite element method