The guard isn't the only thing you have to worry about when you are a thief.
- Part 1 of Blood, Tears, and Vampires
Long ago,two races ruled the earth in peace.Humans and Monsters.
One day a man,envious of the Monsters magical abilities,took the souls of several Boss-Monsters and used them to make fruit shaped vessels containing one magical power each.These powers would be divided into three basic groups: Logia,Paramecia,and Zoan.
Over the years as more and more Boss-Monsters disappeared,'Devil Fruits', became widely known,along with how they were made,and once Monsters caught wind of this they demanded that the leaders of the 20 largest Human countries put a stop to this, only to find out that they were supporting the creation of the vile things.
The 20 human Kings declared war on the Monsters. During the final battle when the Monsters were about to lose,some of the Humans made a barrier around a large underground cavern. So once they drove the monsters into the caverns they could not escape. When the monsters realized they were trapped,in a final act to spite the Humans,cursed them so that the creator of the Devil Fruits would always feel the pain of the monsters and so that those who ate the Devil Fruits(since the world is covered mostly in water)could not swim and would lose their strength when in contact with the sea.