At the optic chiasm choice point, ipsilateral retinal ganglion cells (RGCs) are repelled away from the midline by guidance cues, including Ephrin-B2 and Sonic Hedgehog (Shh). Although guidance cues are normally produced by cells residing at the choice point, the mRNA for Shh is not found at the optic chiasm. Here we show that Shh protein is instead produced by contralateral RGCs at the retina, transported anterogradely along the axon, and accumulates at the optic chiasm to repel ipsilateral RGCs. In vitro, contralateral RGC axons, which secrete Shh, repel ipsilateral RGCs in a Boc- and Smo-dependent manner. Finally, knockdown of Shh in the contralateral retina causes a decrease in the proportion of ipsilateral RGCs in a non-cell-autonomous manner. These findings reveal a role for axon-axon interactions in ipsilateral RGC guidance, and they establish that remotely produced cues can act at axon guidance midline choice points.