Constructing physiologically relevant compartmental models of neurones is critical for understanding neuronal activity and function. We recently suggested that measurements from multiple locations along the soma, dendrites and axon are necessary as a data set when using a genetic optimization algorithm to constrain the parameters of a compartmental model of an entire neurone. However, recordings from L5 pyramidal neurones can routinely be performed simultaneously from only two locations. Now we show that a data set recorded from the soma and apical dendrite combined with a parameter peeling procedure is sufficient to constrain a compartmental model for the apical dendrite of L5 pyramidal neurones. The peeling procedure was tested on several compartmental models showing that it avoids local minima in parameter space. Based on the requirements of this analysis procedure, we designed and performed simultaneous whole-cell recordings from the soma and apical dendrite of rat L5 pyramidal neurones. The data set obtained from these recordings allowed constraining a simplified compartmental model for the apical dendrite of L5 pyramidal neurones containing four voltage-gated conductances. In agreement with experimental findings, the optimized model predicts that the conductance density gradients of voltage-gated K+ conductances taper rapidly proximal to the soma, while the density gradient of the voltage-gated Na+ conductance tapers slowly along the apical dendrite. The model reproduced the back-propagation of the action potential and the modulation of the resting membrane potential along the apical dendrite. Furthermore, the optimized model provided a mechanistic explanation for the back-propagation of the action potential into the apical dendrite and the generation of dendritic Na+ spikes.