I've heard that the octopus king will drop his crown upon dying, but I've killed him many times and I see no crown.
He drops it on death. Check your inventory, under "Hat" in the top right portion of where gear is listed, you should have a drop down. If you see a drop down, you should be able to select the crown from it.
The Candy Box 2 wiki says he always drops the crown. This information could be incorrect, or this could be a bug (the game was released today).