Constant fractional order vibration control strategy has been one of research hotspots in recent decades. However, the variable fractional order control method is seldom concerned up to now. In this article, a novel variable fractional order sliding mode control (VOSMC) method is proposed to suppress the responses of building structure caused by seismic excitations, including El Centro, Hachinohe, Northridge, and Kobe earthquakes. Based on the proposed variable fractional order sliding mode surface, the control law of VOSMC is presented. The global asymptotic stability of the control system is analyzed and proved by utilizing variable fractional order Lyapunov stability theorem. Besides, the corresponding constant fractional order sliding mode control (COSMC) method is also given. The control effects of VOSMC and COSMC methods are discussed by four performance indices. Finally, the utilizability and reasonability of the proposed control method is verified by using two examples (include two-story and five-story shear buildings). Compared with the COSMC method, the proposed variable fractional order controller not only has a lesser control output, but also has a higher utilization of the output, which is conducive to energy saving.