In this study, a semi-analytical model is developed to investigate the fluid-structure coupling characteristics of liquid sloshing in an elastic rectangular container subjected to horizontal external excitation based on the scaled boundary finite element method (SBFEM) for the first time. The fluid inside the container is assumed to be incompressible, inviscid and irrotational, with the hydrodynamic pressure chosen as independent nodal variable in the governing equations. The container walls are considered as cantilever beams. The coupled fluid-structure system is initially divided into the structural domain and fluid domain, after which the SBFEM is employed to obtain the governing equations for each sub-domain. In the framework of the SBFEM, only the boundary of each sub-domain, rather than the entire computational domain, needs to be meshed and discretized. This method reduces the spatial dimension of the problem by one and offers an efficient approach to model the computational domain, while allowing for analytical formulations to be derived for the internal of the domain, resulting in an accurate description of the field variables. The fundamental equation of the entire coupled fluid-structure system is then assembled by performing the equilibrium condition and compatibility condition to ensure the balance of interaction forces at the interface between container walls and the liquid. The free vibrations analysis of the fluid-structure coupling system is solved by utilizing the generalized eigenvalue problem, and the transient dynamic response is determined using the synchronous solution algorithm in conjunction with the implicit-implicit scheme of the Newmark method. To validate the excellent accuracy and stability of the proposed formulation, several numerical examples are presented to investigate the free vibration and transient dynamic characteristics for the fluid-structure coupling problem. The obtained results show good agreement with reference solutions available in the literature. Additionally, the effects of geometrical and material parameters on the system responses are examined and discussed.