The transient sloshing in laterally excited horizontal elliptical containers with T-shaped baffles is first investigated by using a novel semi-analytical scaled boundary finite-element method (SBFEM). The proposed method combines the advantages of the finite-element and the boundary element methods (BEMs) with unique properties of its own, in which a new coordinate system including the circumferential local coordinate and the radial coordinate has been established. Only the boundary of the computational domain needs to be discretized in the circumferential direction as the same as the BEM and the solution in the radial direction is analytical. Assuming ideal, irrotational flow and small-amplitude free-surface elevation, the formulations (using a new variational principle formulation) and solutions of SBFEM equations for an eigenvalue problem under zero external excitation (free sloshing problem) are derived in detail. Subsequently, based on an appropriate decomposition of the container-fluid motion, and considering the eigenvalues and eigenmodes of the above eigenvalue problem, an efficient methodology is proposed for externally induced sloshing through the calculation of the corresponding sloshing masses and liquid motion. Several numerical examples are presented to demonstrate the simplicity, versatility, and applicability of the SBFEM during the simulation of sloshing problems of complex containers, and excellent agreement with the other methods is observed. Meanwhile, three T-shaped baffle configurations are considered including surface-piercing baffle, bottom-mounted baffle and their combination form, and Y-shaped configuration evolved from that of T-shaped baffle has been taken into consideration as well. The liquid fill level, arrangement and length of those baffles affecting the sloshing masses, and liquid motion are investigated in detail. The results also show that the present method can easily solve the singularity problems analytically by choosing the scaling center at the tip of the baffles and allows for the simulation of complex sloshing phenomena using far less number of degrees-of-freedom.