The curious thing about the word free is that its roots can be traced back to the Proto-Indo-European root *pri, meaning to love. This root developed into other similar words with meanings like dear and beloved.
Over time, the P sound of *pri changed to an F, thanks to Grimm’s law. I mentioned this before: it involves a series of shifts in sound in Indo-European languages of Germanic origin, one of which was a general shift from P to F sounds.
This is how we got free from *pri. This might also, by the way, be where the name Frigg, wife of Odin in Norse mythology, comes from, and thus indirectly, Friday.
That’s how the sound changed, but what about the meaning? There’s quite a gap between dear or beloved, and liberated. The main theory to explain this is that the idea of being beloved or dear was applied to one’s friends or family/clan members: free people, as opposed to slaves, who, I probably don’t need to state, were far from free.
Once free came to be used with this general meaning, it wasn’t a huge leap for it to mean not requiring payment, as free from payment/charge gradually became reduced to just free.