According to mythology, Anafi (from the Greek anadysi, or rising) rose from the waters of the Aegean as a result of the god Apollo's desire to provide a safe harbor for Jason's storm-struck Argonauts. To thank the god, they built the temple of Apollo Astealtas near the Zoodohos Pigi monastery and honored the god with the annual Yakinthia festival.
Other myths claim Anafi was the home of Aeolus, god of the winds, who helped Odysseus with favorable winds on his journey home. The island was settled by the Phoenicians. They were succeeded by the Dorians, who founded the city of Anafi.
In the fifth century B.C., Anafi joined the Athenian League or Confederacy. In medieval times, the island came under the administration of the Duchy of Naxos and was ruled by Venetian leaders. However, they were unable to protect the island from marauding pirates who forced many of its inhabitants to flee to Crete. In 1537, Anafi was pillaged by the pirate Barbarossa, then fell under Ottoman rule. It took an active part in the Greek independence revolution of 1821 and officially became a part of the modern Greek state in 1832.