The phrase comes from Jesus’ teaching, recorded in John 8, to some who had just come to believe in him. To them Jesus said, “If you abide in my word, you are truly my disciples, and you will know the truth, and the truth will set you free.”
In context he is saying that if anyone accepts and holds to Jesus teaching, committing themselves to him, they show themselves to be, in truth, his followers; they will know, by experience, the truth, which refers ultimately to Jesus himself (John 14:6), and that he will set them completely free from sin, from condemnation, and from death. He concludes by saying, “if the Son sets you free, you will be free indeed.”