Between 5,000 and 6,000 years ago, many Neolithic societies declined throughout western Eurasia due to a combination of factors that are still largely debated. Here, we report the discovery and genome reconstruction of Yersiniapestis, the etiological agent of plague, in Neolithic farmers in Sweden, pre-dating and basal to all modern and ancient known strains of this pathogen. We investigated the history of this strain by combining phylogenetic and molecular clock analyses of the bacterial genome, detailed archaeological information, and genomic analyses from infected individuals and hundreds of ancient human samples across Eurasia. These analyses revealed that multiple and independent lineages of Y. pestis branched and expanded across Eurasia during the Neolithic decline, spreading most likely through early trade networks rather than massive human migrations. Our results are consistent with the existence of a prehistoric plague pandemic that likely contributed to the decay of Neolithic populations in Europe.