Virtual synchronous machines (VSMs) have been widely investigated for improving the inertia of power systems and providing reliable frequency control against rapid penetration of renewable energy sources. But the drawback of these studies is the lack of global stability evaluation of VSMs in various operating conditions. In this paper, a new global stable VSM is proposed using the Lyapunov method to attain a stable frequency and voltage magnitude for a weak grid-connected microgrid. The proposed Lyapunov-based VSM uses an initial model of VSM, that incorporates small-signal linearization and the swing equation of synchronous generators. Using a comprehensive dynamic model with state variables including the VSM currents, angular frequency and the VSM input voltage, the Lyapunov method is then applied to the initial VSM in order to attain the proposed VSM with the desired global stability. To further illustrate the proposed VSM's advantages over the initial VSM, an index known as the angular frequency regulation efficiency is presented. The Lyapunov coefficients are also adjusted using a two-stage process. The first adjustment process is based on the proposed VSM control function errors. In this regard, the control function Lyapunov coefficients are analyzed relying on the Lyapunov coefficient variation trend of angular frequency and d-component current in the frame of two- and three-dimensional curves. Moreover, a Hyperbola curve–based assessment is established for determining the Lyapunov coefficient effects on the decrement of the VSM current errors. MATLAB/SIMULINK environment is utilized to validate the effective and superior performances of the proposed VSM acquired from the global stability feature