The generation of action potential brings into play specific mechanosensory stimuli manifest in the variation of membrane capacitance, resulting from the selective membrane permeability to ions exchanges and testifying to the central role of electromechanical processes in the buildup mechanism of nerve impulse. As well established [See e.g. D. Gross et al, Cellular and Molecular Neurobiology vol. 3, p. 89 (1983)], in these electromechanical processes the net instantaneous charge stored in the membrane is regulated by the rate of change of the net fluid density through the membrane, orresponding to the difference in densities of extacellular and intracellular fluids. An electromechanical model is proposed for which mechanical forces are assumed to result from the flow of ionic liquids through the nerve membrane, generating pressure waves stimulating the membrane and hence controlling the net charge stored in the membrane capacitor. The model features coupled nonlinear partial differential equations: the familiar Hodgkin-Huxleys cable equation for the transmembrane voltage in which the membrane capacitor is now a capacitive diode, and the Heimburg-Jacksons nonlinear hydrodynamic equation for the pressure wave controlling the total charge in the membrane capacitor. In the stationary regime, the Hodgkin-Huxley cable equation with variable capacitance reduces to a linear operator problem with zero eigenvalue, the bound states of which can be obtained exactly for specific values of characteristic parameters of the model. In the dynamical regime, numerical simulations of the modified Hodgkin-Huxley equation lead to a variety of typical figures for the transmembrane voltage, reminiscent of action potentials observed in real physiological contexts.