Both are correct English. English is fairly flexible in word order. #1 has an unusual word order. #2 has the everyday, customary word order. Unusual word orders are sometimes used for emphasis, or to produce a feeling or an effect.
This is a special case, because this is a common saying, and _it is commonly quoted in the first form._
It is actually an English translation of a saying in ancient Greek. I find that Wikipedia suggests that the word order might be intended to remind us of the word order in the original Greek. But it also suggests that it might echo a line from a famous and much-quoted 1642 English poem: "To Althea, from Prison," by Richard Lovelace, which begins
"Stone walls do not a prison make
Nor iron bars a cage."
In any case, phrasing #1 is correct but unusual, and is _intended_ to give a flavor of something ancient or old-fashioned. It is intended to sound dignified, or weighty, or wise.