Due to the complexity of fluid–structure interactions (FSI), the majority of studies in the literature dealing with the sloshing problem are restricted to rigid tanks. This paper is devoted to a numerical investigation of the liquid sloshing behavior in a flexible tank subjected to external loading. A numerical methodology is proposed, taking into account the FSI problem by coupling two open-source codes: OpenFOAM for the fluid and FEniCS for the solid, using the preCICE library, a free library for fluid–structure interaction. The Arbitrary Lagrangian–Eulerian formulation is used for the two-phase flow system to solve the Navier–Stokes equations in the fluid domain using the finite volume method. Simultaneously, the linear-elastic equation of the structure is solved using the finite element method. An implicit coupling scheme is considered at the fluid–structure interface. The numerical methodology is validated by the results given in literature for harmonic excitation at different frequencies. Subsequently, an analysis of complex external loading, such as Gabor wavelets and earthquake ground motion, is conducted to highlight the significant impact of the wall flexibility on sloshing, as well as the influence of hydrodynamic forces on the structure’s deformation. The proposed coupling methodology is robust and effective, it can be applied to all types of liquids and materials. A dataset of one of the studied cases is given as a supplement to the paper (Kha et al., 2024).