In the primary visual cortex (V1) of higher mammals, long-range horizontal connections (LHCs) are observed to develop, linking iso-orientation domains of cortical tuning. It is unknown how this feature-specific wiring of circuitry develops before eye-opening. Here, we suggest that LHCs in V1 may originate from spatiotemporally structured feedforward activities generated from spontaneous retinal waves. Using model simulations based on the anatomy and observed activity patterns of the retina, we show that waves propagating in retinal mosaics can initialize the wiring of LHCs by coactivating neurons of similar tuning, whereas equivalent random activities cannot induce such organizations. Simulations showed that emerged LHCs can produce the patterned activities observed in V1, matching the topography of the underlying orientation map. The model can also reproduce feature-specific microcircuits in the salt-and-pepper organizations found in rodents. Our results imply that early peripheral activities contribute significantly to cortical development of functional circuits.