After indicating what the spiritual state consists in, namely, in charity, the Apostle then deals with the cause of the state, namely, of the Holy Spirit Whom he says they must follow. And he mentions three benefits obtained from the Holy Spirit. First, freedom from the bondage of the flesh; Secondly, freedom from the bondage of the Law (v. 18); Thirdly, the conferring of life, or security from the damnation of death (v. 25). As to the first, he does two things: First, he sets down the first benefit of the spirit; Secondly, he shows the need for this benefit (v. 17).
He says therefore: I say ...that you are obliged by charity of spirit to serve one another, because nothing profits without charity. But this "I say in Christ," i.e., by the faith of Christ, "walk in the spirit", i.e., in the mind and reason. For sometimes our mind is called a spirit, according to Ephesians (4:23): "Be renewed in the spirit of your mind," and "I will sing with the spirit, I will sing also with the understanding" (1 Cor 14:15). Or, "walk in the spirit," i.e., make progress in the Holy Spirit, by acting well. For the Holy Spirit moves and incites hearts to do well: "Whosoever are led by the Spirit of God, they are the sons of God" (Rom 8:14). One should walk, therefore, by the spirit, i.e., the mind, so that one's reason or mind is in accord with the Law of God, as it is said in Romans (7:16). For the human spirit is fickle, and unless it is governed from elsewhere, it turns now in one direction and now in another, as is said in Sirach (34:6): "The heart fancieth as that of a woman in travail. Except it be a vision sent forth from the most High, set not thy heart upon them." Hence Ephesians (4:17) says of certain ones: "They walk in the vanity of their mind." Therefore the human reason cannot stand perfectly except to the extent that it is governed by a divine spirit.
Accordingly the Apostle says, "walk in the spirit," i.e., under the rule and guidance of the Holy Spirit, Whom we should follow as one pointing out the way. For knowledge of the supernatural end is in us only from the Holy Spirit: "Eye hath not seen nor ear heard, neither hath it entered into the heart of man what things God hath prepared for them that love Him," and immediately is added, "But to us God hath revealed them by his Spirit" (1 Cor 2:9). Also as one who inclines us. For the Holy Spirit stirs up and turns the affections to right willing: "Whosoever are led by the Spirit of God, they are the sons of God" (Rom 8:14); "Thy good spirit shall lead me into the right land" (Ps 142:10).
Now one ought to walk in the spirit, because it frees him from the defilement of the flesh. Hence he follows with: "and you shall not fulfil the lusts of the flesh," i.e., the pleasures which the flesh suggests. This the Apostle yearned for, saying: "Unhappy man that I am, who shall deliver me from the body of this death?" (Rom 7:24). Later he concludes: "There is now therefore no condemnation to them that are in Christ Jesus, who walk not according to the flesh" (Rom 8:1). And at once he gives the reason for this: "For the law of the spirit of life in Christ Jesus hath delivered me from the law of sin and of death" (Rom 8:2). And this is the special desire of the saints, that they not fulfill the desires to which the flesh stirs them, but always understanding that in this are not included desires which pertain to the necessities of the flesh, but those that pertain to superfluities.
Source: Commentary on Galatians