Spinach is a nutritious leafy vegetable belonging to the family Chenopodiaceae. Here we report a chromosome-scale reference genome assembly of spinach, which has a total size of 894.3 Mb and an N50 contig size of 23.8 Mb, with 98.3% anchored and ordered on the six chromosomes. Reconstruction of ancestral Chenopodiaceae karyotype indicates substantial genome rearrangements in spinach after its divergence from ancestral Chenopodiaceae, coinciding with high repeat content in the spinach genome. Resequencing the genomes of 305 cultivated and wild spinach accessions provides insights into spinach genetic diversity and population differentiation. Genome-wide association studies of 20 agronomical traits identify numerous significantly associated regions and candidate genes for these traits. Domestication sweeps in the spinach genome are identified, some of which are associated with important traits (e.g., leaf phenotype, bolting and flowering), demonstrating the role of artificial selection in shaping spinach phenotypic evolution. This study provides not only insights into the spinach evolution and domestication but also valuable resources for facilitating spinach breeding.