Cortical pyramidal cells are constantly bombarded by synaptic activity, much of which arises from other cortical neurons, both in normal conditions and during epileptic seizures. The action potentials generated by barrages of synaptic activity may exhibit a variable site of origin. Here we performed simultaneous whole cell recordings from the soma and axon or soma and apical dendrite of layer 5 pyramidal neurons during normal recurrent network activity (up states), the intrasomatic or intradendritic injection of artificial synaptic barrages, and during epileptiform discharges in vitro. We demonstrate that under all of these conditions, the real or artificial synaptic bombardments propagate through the dendrosomatic-axonal arbor and consistently initiate action potentials in the axon initial segment that then propagate to other parts of the cell. Action potentials recorded intracellularly in vivo during up states and in response to visual stimulation exhibit properties indicating that they are typically initiated in the axon. Intracortical axons were particularly well suited to faithfully follow the generation of action potentials by the axon initial segment. Action-potential generation was more reliable in the distal axon than at the soma during epileptiform activity. These results indicate that the axon is the preferred site of action-potential initiation in cortical pyramidal cells, both in vivo and in vitro, with state-dependent back propagation through the somatic and dendritic compartments.