In butterflies and moths, which exhibit highly variable sex determination mechanisms, the homogametic Z chromosome is deeply conserved and is featured in many genome assemblies. The evolution and origin of the female W sex chromosome, however, remains mostly unknown. Previous studies have proposed that a ZZ/Z0 sex determination system is ancestral to Lepidoptera, and that W chromosomes may originate from sex-linked B chromosomes. Here, we sequence and assemble the female Dryas iulia genome into 32 highly contiguous ordered and oriented chromosomes, including the Z and W sex chromosomes. We then use sex-specific Hi-C, ATAC-seq, PRO-seq, and whole genome DNA sequence datasets to test if features of the D. iulia W chromosome are consistent with a hypothesized B chromosome origin. We show that the putative W chromosome displays female-associated DNA sequence, gene expression, and chromatin accessibility to confirm the sex-linked function of the W sequence. In contrast with expectations from studies of homologous sex chromosomes, highly repetitive DNA content on the W chromosome, the sole presence of domesticated repetitive elements in functional DNA, and lack of sequence homology with the Z chromosome or autosomes is most consistent with a B chromosome origin for the W, although it remains challenging to rule out extensive sequence divergence. Synteny analysis of the D. iulia W chromosome with other female lepidopteran genome assemblies shows no homology between W chromosomes and suggests multiple, independent origins of the W chromosome from a B chromosome likely occurred in butterflies.