Recent in vivo experiments have revealed that the action potential threshold depends on the rate of depolarization just preceding the spike. This phenomenon can be reproduced in the Hodgkin-Huxley model. We analyzed spike initiation in the (V, h) phase space, where h is the sodium inactivation variable, and found that the dynamical system exhibits a saddle equilibrium, whose stable manifold is the curve of the threshold. We derived an equation of this manifold, which relates the threshold to the sodium inactivation variable. It leads to a differential equation of the threshold depending on the membrane potential, which translates into an integrate-and-fire model with an adaptive threshold. The model accounts well for the variability of threshold and the slope-threshold relationship. See figure 1.