Identifying the genetic factors that underlie complex traits is central to understanding the mechanistic underpinnings of evolution. Cave-dwelling Astyanax mexicanus populations are well adapted to subterranean life and many populations appear to have evolved troglomorphic traits independently, while the surface-dwelling populations can be used as a proxy for the ancestral form. Here we present a high-resolution, chromosome-level surface fish genome, enabling the first genome-wide comparison between surface fish and cavefish populations. Using this resource, we performed quantitative trait locus (QTL) mapping analyses and found new candidate genes for eye loss such as dusp26. We used CRISPR gene editing in A. mexicanus to confirm the essential role of a gene within an eye size QTL, rx3, in eye formation. We also generated the first genome-wide evaluation of deletion variability across cavefish populations to gain insight into this potential source of cave adaptation. The surface fish genome reference now provides a more complete resource for comparative, functional and genetic studies of drastic trait differences within a species.