The pattern of contralaterally and ipsilaterally projecting retinal ganglion cell (RGC) axons at the optic chiasm is essential for the establishment of binocular vision. Contralateral axons cross the chiasm midline as they progress from the optic nerve to the optic tract. In contrast, ipsilateral axons deviate from the chiasm and continue in the ipsilateral optic tract, avoiding the chiasm midline. The molecular mechanism underlying this phenomenon is not completely understood. Here we show that the Sonic Hedgehog (Shh) receptor Boc is enriched in ipsilateral RGCs of the developing retina. Together with the presence of Shh at the midline, this complementary expression pattern led us to hypothesize that Shh might repel ipsilateral RGC axons at the chiasm. Consistent with this hypothesis, we found that only Boc-positive RGC axons retract in vitro in response to Shh and that this response is lost in Boc mutant RGCs. In vivo, we show that Boc is required for the normal segregation of ipsilateral axons at the optic chiasm and, conversely, that Boc expression in contralateral RGCs prevents their axons from crossing the optic chiasm. Together, these results suggest that Shh repels ipsilateral RGC axons at the optic chiasm via its receptor Boc. This work identifies a novel molecular pathway required for the segregation of axons at the optic chiasm.