The spatial distribution of macromolecules and organelles in neurons is highly nonuniform. How cells achieve and maintain these expression patterns is unknown, but is believed to involve microtubular-based transport. Using mathematical analysis and numerical simulation, we show how reliable transport systems can be implemented in complex neuron morphologies. We derive a simple rule that relates local trafficking rates to the global steady-state distribution of cargo, and illustrate how this rule can be encoded by a second-messenger molecule, such as Ca2+. Similar, but more flexible, transport strategies were developed for a model that included nonuniform activation or microtubular detachment of cargo. These models make several experimental predictions about the time scale of transport and cell-to-cell variability in spatial expression patterns. We illustrate these predictions in CA1 pyramidal cells, which rely on transport of activity-inducible mRNAs and proteins for long-lasting synaptic plasticity, and display linear expression gradients in HCN and potassium channels.