The insect order Lepidoptera (butterflies and moth) represents the largest group of organisms with ZW/ZZ sex determination. While the origin of the Z chromosome predates the evolution of the Lepidoptera, the W chromosome is considered younger, but its origin is debated. To shed light on the origin of the lepidopteran W, we here produce chromosome-level genome assemblies for the butterfly Pieris mannii, and compare the sex chromosomes within and between P. mannii and its sister species P. rapae. Our analyses clearly indicate a common origin of the W chromosomes of the two Pieris species, and reveal similarity between the Z and W in chromosome sequence and structure. This supports the view that the W originates from Z-autosome fusion rather than from a redundant B chromosome. We further demonstrate the extremely rapid evolution of the W relative to the other chromosomes and argue that this may preclude reliable conclusions about the origin of the W based on comparisons among distantly related Lepidoptera. Finally, we find that sequence similarity between the Z and W chromosomes is greatest toward the chromosome ends, perhaps reflecting selection for the maintenance of recognition sites essential to chromosome segregation. Our study highlights the utility of long-read sequencing technology for illuminating chromosome evolution.