Final answer:
Miguel de Cervantes was held captive for five years in Algiers from 1575 to 1580, after being captured by Barbary pirates.
Step-by-step explanation:
Miguel de Cervantes, the esteemed Spanish writer known for his masterpiece Don Quixote, was held captive for a significant period during his life. After being captured by Barbary pirates in 1575, Cervantes was taken to Algiers where he was held as a slave. He endured this captivity for five years until his eventual release in 1580, after his family paid a ransom. The experience of his imprisonment played a crucial role in shaping Cervantes's literary work, providing a profound insight into the human condition—themes that are prevalent in his writing.