In order to sell them, first they must have owned them. How did they come to own them? Either they bought them or they rounded them up.
same way as US, Mexico, Central and South America Indians did- they hunted and captured them as spoils of war, or claimed a tribe or family debt was owed. The Mayans and Aztecs had full-time armies. Some detachments were focused on people hunting, exactly the same as what was going on in the African continent:
Regarding indigenous pre-Atlantic contact with Africa:
“... indigenous slavery was more common in countries closer to the Equator, in West Africa and specifically in the West-Central African Belgian colonies (present-day Rwanda, Burundi and the Congo Democratic Republic). There is also weak evidence that it was more prevalent among societies with more developed states and in those that had written records. We find no clear impact of Islam or of export slavery on the prevalence of indigenous slavery, despite frequent debates on these issues in the literature.
...3 There is early pre-colonial evidence of slavery among the Berbers of Morocco and Algeria, the Tuaregs of the Sahara, the Ethiopeans, Egyptians and Somalis of northeast Africa, the Buhganda states and Nyamwezi and Chagga peoples of inland East Africa, the Mrima and Omani Arabs of coastal East Africa, the Wolof of Senegal and the Gambia, the Mende and Temne of Sierra Leone, the via of Liberia, the Duala of Cameroon, the Bakongo nd Luande of Congo, the Lozi of Zambia and, as Perbi (2001:2) notes, virtually al the states and societies in Guinea, Ghana, Ivory Coast, Dahomey, Mali, Nigeria, etc. 4 This is not to suggest that export slavery started with the Atlantic slave trades. African slaves were acquired by the ancients Egyptians, the Greeks and the Romans and by mediaeval Europe, Arabia, the Ottoman Empire, and Asia. From the 1435 capture by the Ottomans of Constantinople which halted the flow of white slaves from the Black Sea regions and Balkans, mediaeval Europe turned completely to Africa for its slave labour (Perbi, 2001:3; Mc Kay et al, 1992). In modern times, export slavery was towards the Oriental, Islamic and, especially, Atlantic worlds during the 15th to 19th centuries (Perbi, 2001:4).
http://www.csae.ox.ac.uk/conferences/2009-EdiA/papers/095-Lensink.pdf
“In Pre-Columbian Mesoamerica the most common forms of slavery were those of prisoners of war and debtors...Most victims of human sacrifice were prisoners of war or slaves.[5]
...The Haida, Nuu-chah-nulth, Tlingit, Coast Tsimshian and some other tribes who lived along the Pacific Northwest Coast were traditionally known as fierce warriors and slave-traders....Among some Pacific Northwest tribes about a quarter of the population were slaves.[7][8][9]
https://en.wikipedia.org/wiki/Slavery_among_the_indigenous_peoples_of_the_Americas