Although God does not convert some sinners to Himself, but leaves them in their sins in view of their guilt, He does not lead them into sin.
For people sin by turning away from Him who is the ultimate end. But since every efficient cause acts for its own proper and fitting end, it is impossible that people, with God as the cause, should be turned away from the ultimate end, for God is the ultimate end. Therefore, it is impossible that God should cause people to sin.
Likewise, the good cannot be the cause of evil. But sin is the evil of man (that is, the bad): for it is contrary to man’s own good, namely, to live according to reason. Therefore, it is impossible that God should be the cause of sin for anyone. Furthermore, all wisdom and goodness in man is derived from divine wisdom and goodness, as a kind of image thereof. But it is contrary even to human wisdom and goodness to lead someone to sin. Therefore, this applies even more to divine wisdom and goodness. Moreover, every defect arises from a deficiency in the proximate cause, not from the action of the first cause: thus, the defect of lameness arises from a (defective) condition of the shinbone, not from the moving power (the control of walking); on the contrary, from this comes everything that still appears as perfection in the movement of limping. The proximate cause of human failing (sin) is the will. Therefore, the defect of sin comes from the will of man, not from God, the first cause: from Him, however, comes everything that pertains to the perfection of the act in the sinful deed. Therefore, it is said in Ecclesiasticus 15:12: “Say not: He has caused me to fall; for He has no need of wicked men.” And further down (verse 20): “He has commanded no one to do wickedly, and has given no one permission to sin.” And James 1:13 says: “Let no one say when he is tempted: I am tempted by God; for God is the opposite of the tempter to evil.”
Nevertheless, there are certain passages in Holy Scripture from which it seems that God is the cause of sin for some people. For it says in Exodus 10:1: “I have hardened the heart of Pharaoh and his servants”; and in Isaiah 6:10: “Make the heart of this people fat, and make their ears heavy, lest they see with their eyes, and convert, and be healed”; and Isaiah 63:17: “You have made us err from your ways; you have hardened our heart, that we should not fear you.” And Romans 1:28 says: “God gave them up to a reprobate mind, to do those things which are not fitting.” All this is to be understood in the sense that God does not grant some people the help to avoid sin, which He grants to others.
This help, however, consists not only in the influence of grace, but also in an external protection, by which, through divine providence, occasions for sinning are taken away from man and temptations to sin are suppressed. God also helps man against sin through the natural light of reason and through other natural goods that He grants to man. Therefore, if He withdraws this help from some people, insofar as His justice requires it in view of the guilt of their actions, it is said that He “hardens” or “blinds” them, or something of the kind as mentioned above.
Source: Summa Contra Gentiles, Book 3, Chapter 162