Based on the principle of energy variation, an improved Fourier series is introduced as an allowable displacement function. This paper constructs a calculation model that can study the in-plane and out-of-plane free and forced vibrations of curved beam structures under different boundary conditions. Firstly, based on the generalized shell theory, considering the shear and inertial effects of curved beam structures, as well as the coupling effects of displacement components, the kinetic energy and strain potential energy of the curved beam are obtained. Subsequently, an artificial spring system is introduced to satisfy the constraint condition of the displacement at the boundary of the curved beam, obtain its elastic potential energy, and add it to the system energy functional. Any concentrated mass point or concentrated external load can also be added to the energy function of the entire system with a corresponding energy term. In various situations including classical boundary conditions, the accuracy and efficiency of the method in this paper are proved by comparing with the calculation results of FEM. Besides, by accurately calculating the vibration characteristics of common engineering structures like slow curvature (whirl line), the wide application prospects of this method are shown.