In terms of vibrations along bidirectional earthquake forces, several problems are faced when modelling and controlling the structure of a building, such as lateral-torsional vibration, uncertainties surrounding the rigidity and the difficulty of estimating damping forces.In this paper, we use a fuzzy logic model to identify and compensate the uncertainty which does not require an exact model of the building structure. To attenuate bidirectional vibration, a novel discrete-time sliding mode control is proposed. This sliding mode control has time-varying gain and is combined with fuzzy sliding mode control in order to reduce the chattering of the sliding mode control. We prove that the closed-loop system is uniformly stable using Lyapunov stability analysis. We compare our fuzzy sliding mode control with the traditional controllers: proportional?integral?derivative and sliding mode control. Experimental results show significant vibration attenuation with our fuzzy sliding mode control and horizontal-torsional actuators. The proposed control system is the most efficient at mitigating bidirectional and torsional vibrations.