Precise neural circuits emerge through the interplay of genetic programming and activity-dependent refinement. The refinement of olfactory map is instructed by olfactory receptors (ORs) expressed in olfactory sensory neurons. OR identity is represented as a combinatorial code of axon-sorting molecules, whose expression is regulated by neural activity. However, how neural activity induces OR-specific expression patterns of axon-sorting molecules remains unclear. Here, we applied genetic approaches to explore the regulatory mechanisms underlying combinatorial expression of these molecules. Using calcium imaging, we revealed that the spatiotemporal patterns of spontaneous neuronal spikes varied among neurons and were uniquely correlated with the expressed ORs. Receptor substitution experiments demonstrated that ORs determine spontaneous activity patterns. Moreover, optogenetically differentiated patterns of neuronal activity induced specific expression of the corresponding axon-sorting molecules and regulated axon targeting. Thus, temporal patterns of spontaneous activity play instructive roles in generating the combinatorial code of axon-sorting molecules during olfactory map formation.