The hexaploid sweetpotato (Ipomoea batatas [L.] Lam.) is a globally important stable crop and plays a significant role in biofortification. The high resilience and adaptability of sweetpotato provide it with advantages in addressing food security and climate change issues. Here we report a haplotype-resolved chromosome-level genome assembly of an African cultivar, 'Tanzania', which enables ancestry inference along the haplotype-phased chromosomes. Our analyses reveal that the wild tetraploid I. aequatoriensis, currently found in coastal Ecuador, is the closest known relative of sweetpotato and likely a direct descendant of one of the sweetpotato progenitors. The other unknown progenitor(s) of sweetpotato have a closer genetic relationship to the wild tetraploid I. batatas 4x, distributed in Central America, than to I. aequatoriensis. The different ancestral sequences are not distributed in typical subgenomes but are intertwined on the same chromosomes, possibly due to the known non-preferential recombination among haplotypes. Although I. batatas 4x was not involved in the hexaploidization event, introgression from I. batatas 4x to the hexaploid sweetpotato is evident. Our study improves our understanding of sweetpotato origin and provides valuable genomic resources to accelerate sweetpotato breeding.