In neurons, the axon initial segment (AIS) is a specialized region near the start of the axon that is the site of action potential initiation. The precise location of the AIS varies across and within different neuronal types, and has been linked to cells' information-processing capabilities; however, the factors determining AIS position in individual neurons remain unknown. Here we show that changes in electrical activity can alter the location of the AIS. In dissociated hippocampal cultures, chronic depolarization with high extracellular potassium moves multiple components of the AIS, including voltage-gated sodium channels, up to 17 mum away from the soma of excitatory neurons. This movement reverses when neurons are returned to non-depolarized conditions, and depends on the activation of T- and/or L-type voltage-gated calcium channels. The AIS also moved distally when we combined long-term LED (light-emitting diode) photostimulation with sparse neuronal expression of the light-activated cation channel channelrhodopsin-2; here, burst patterning of activity was successful where regular stimulation at the same frequency failed. Furthermore, changes in AIS position correlate with alterations in current thresholds for action potential spiking. Our results show that neurons can regulate the position of an entire subcellular structure according to their ongoing levels and patterns of electrical activity. This novel form of activity-dependent plasticity may fine-tune neuronal excitability during development.