In this study, a novel concept for a downhole flywheel energy storage module to be embedded in a bottom-hole-assembly (BHA) is presented and modeled, as an alternative power source to existing lithium-ion battery packs currently deployed in drilling operations. Lithium-ion batteries disadvantages include deteriorated performance in high temperature, limited lifetime that necessitates frequent replacement which elevates operation costs, and environmental hazards associated with its proper disposal. Extreme and harsh F and 20 kpsi, respectively, as well as violent vibrations encountered during drilling. Moreover, the flywheel module should adhere to the geometric constraints of the wellbore and the BHA in which it is embedded. A five-axis magnetic levitation control system was designed and tuned to maintain continuous suspension of the flywheel under the harsh lateral, axial and torsional drilling vibrations of the BHA. This necessitated complete identification and modeling of the drillstring dynamics and the sources of vibrations excitation that include stick-slip, bit-bounce, and whirling. Thus, an integrated finite element model was developed that included the rotordynamic behavior of the flywheel and the BHA, the component dynamics of the magnetic levitation control system, and the drillbit cutting dynamics. The model also included a newly developed model for coupling between lateral, axial and torsional vibrations. It was demonstrated through numerical simulations that the active magnetic bearings (AMB) successfully maintain continuous flywheel suspension due to all different types of external vibration as well as its own lateral vibration due to mass imbalance.