While it might seem odd, "lie" in this context comes from the Old English word "lēan," meaning "to lean" or "to rest." The "re" prefix signifies "again" or "back," so "rely" literally means "to lean back on" or "to rest upon."
This makes sense because relying on something or someone means placing your trust and confidence in them, as if you are leaning back on them for support.