The trans-Saharan trade ended largely because of the voyages of the Portuguese explorers along the coast of Africa. As these voyages continued, the economic importance of the Europeans grew and the importance of the trans-Saharan trade declined.
As this happened, trade routes shifted. Instead of going across the Sahara, the trade routes led to the west coast of Africa. There, goods and slaves from western Africa were traded by sea rather than over land.
The economic and trade situation at the end of the trans-Saharan trade, then, was a situation in which Europeans were becoming more important. European ships were more efficient at moving goods and the Europeans were wealthier than the North Africans with whom the trade had formerly been conducted.