The telencephalon is the most complex brain region, controlling communication, emotion, movement and memory. Its adult derivatives develop from the dorsal pallium and ventral subpallium. Despite knowledge of genes required in these territories, we do not understand how evolution has shaped telencephalon diversity. Here, using rock- and sand-dwelling cichlid fishes from Lake Malawi, we demonstrate that differences in strength and timing of opposing Hedgehog and Wingless signals establish evolutionary divergence in dorsal-ventral telencephalon patterning. Rock dwellers exhibit early, extensive Hedgehog activity in the ventral forebrain resulting in expression of foxg1 before dorsal Wingless signals, and a larger subpallium. Sand dwellers show rapid deployment of Wingless, later foxg1 expression and a larger pallium. Manipulation of the Hedgehog and Wingless pathways in cichlid and zebrafish embryos is sufficient to mimic differences between rock- versus sand-dweller brains. Our data suggest that competing ventral Hedgehog and dorsal Wingless signals mediate evolutionary diversification of the telencephalon.