In non-central relativistic heavy-ion collisions, the non-colliding nucleons drag the colliding nucleons along the longitudinal direction asymmetrically, producing a longitudinally tilted quark-gluon plasma (QGP) fireball. Meanwhile, these colliding nuclei deposit a huge initial orbital angular momentum into the system, leading to the polarization of partons inside the QGP along the direction of the total angular momentum. Based on the optical Glauber model, we develop a 3-dimensional initial condition of the tilted QGP. By combining it with the (3+1)-dimensional viscous hydrodynamic model CLVisc, we investigate the directed flow of charged hadrons and the global polarization of
$ \Lambda/\bar{\Lambda} $
hyperons in heavy-ion collisions. Our calculation indicates that the combination of a tilted initial condition of the QGP and the hydrodynamic model can provide a satisfactory description of the directed flow and global polarization observed at RHIC-STAR. This offers a theoretical baseline for using these observables to further constrain the initial geometry and kinematic properties of the nuclear matter created in heavy-ion collisions.