The question of Peter’s freedom and responsibility (or lack thereof) in his denial of Christ is one example of many times in Scripture where the tension between God’s sovereignty and man’s responsibility is demonstrated.
As Christians, it’s important for us to sit as students under the counsel of God’s Word and accept the paradox we sometimes see, rather than imposing our presuppositions on Scripture. Although most people would say that free will and predestination are incompatible, nowhere in Scripture is this indicated. In fact, we see just the opposite—our actions are determined, yet we also have freedom to choose.
I think it’s important to recognize that in choosing to deny Christ, Peter’s will was free—external forces did not coerce him into denying Christ. “Free will” can be described as a statement of what we can do, even if there is only one thing we would do. Peter could have chosen to remain faithful to Christ at that moment, even though what he would do was different. He chose according to his strongest desire at that point in time. I think the drama of the story bears witness to this. Peter had time to think about his decision, even up to an hour between the second and third denial (Lk. 22:59). Scripture also tells us that he “wept bitterly” (Lk. 22:62) after the third time—his freely chosen action resulted in his great sense of guilt. As far as he was concerned, Peter himself determined his own choice.
On the other hand, our freedom is constrained in a certain way “even if we don’t feel it because we exercise our freedom in exactly the way God wanted us to.” I appreciate the way the Westminster Confession of Faith recognizes this tension wherein it says that God not only ordains, “whatsoever comes to pass,” but also the means by which it comes to pass so that the “liberty or contingency of second causes (e.g. our free will) [is not] taken away, but rather established.” Scripture speaks very clearly of the overarching, sovereign control of God who works all things according to His purpose “after the counsel of His will” (Eph. 1:11 NASB). Some factors that God might use to influence the “Self” to bring about the “Choice” to cause the “Action” are experience, biology, or environment. The point being that God determines everything that comes to pass, but uses means to accomplish His plan.
To summarize, we can say without logical contradiction that Peter freely chose according to his strongest desire, yet his choice was superintended by God who accomplishes whatever His hand and His purpose predestined to occur (Acts 4:28).
 Tim Sansbury, “Ethics,” Lecture 3, (Knox Theological Seminary: 2017).
 Ibid., Lecture 2.
 Ibid., Lecture 4.
The Westminster Confession of Faith (Oak Harbor, WA: Logos Research Systems, Inc., 1996), 3.1.
 Sansbury, “Ethics,” Lecture 3.