"Given the evolution of the music industry and the proliferation of streaming technology, it was natural we would partner with Spotify to offer customers a new way to engage with their favorite music," added Starbucks president Kevin Johnson.
The partnership will start later this year at Starbucks' 7000 company-owned US stores.
Starbucks said it would later roll out the tie-up in Canada and Britain.
Starbucks was once seen by the music industry as a great hope for selling CDs, with selections offered on racks as customers waited for coffees.
In 2004, Starbucks also introduced in select stores a burning service, allowing customers to select tracks to make their own CDs.
But Starbucks in March stopped selling CDs, saying only that it was exploring new options.
In 2014, streaming overtook CD sales revenue for the first time in the United States, by far the world's largest music market.
CDs remain the preferred format in Germany and Japan, while Nordic countries have rapidly embraced streaming.
- AAP