The simple answer is that we don’t know, because the Bible does not tell us.
However, there are hints which may suggest that it did. After Adam and Eve sinned by eating the fruit of the tree of the knowledge of good and evil, God spoke to Adam, Eve and the serpent. The key verse is Genesis 3:14 where God curses the serpent:
The LORD God said to the serpent,
“Because you have done this, cursed are you above all livestock
and above all beasts of the field; on your belly you shall go,
and dust you shall eat all the days of your life.
The serpent was to go on its belly and (a little poetically), “eat dust”. If the snake had walked before then, this comment would make perfect sense as a curse – it would lose the ability to walk and lift itself above the ground. If the snake had always travelled on its belly as snakes do now, this would have no obvious meaning as a curse since it made no change to the existing situation.
I believe I remember reading once before that some snakes have an apparent change in scale pattern or some other kind of marking that would indicate the spot where in other reptiles legs grow. I also know there is a type of snake that is actually not a true snake by scientific classification, but rather a “legless lizard.” Perhaps these things are futher indications of the formerly-walking serpent.