Your question is an incredibly deep one, and some answers have already been given. I'd like to supplement the those answers with one that hasn't yet been suggested (but which is a rather old understanding of God's role in human freedom). One school of Thomistic thought (that is to say, some thinkers who follow Thomas Aquinas) holds that God is the supreme cause of all actions, including the actions of free beings. In this way of thinking, God causes the freedom of the individuals; God causes the individuals to freely act, similarly to how God causes chance events to occur as coincidences (rather than as necessary events).
For a striking discussion of the relation between human action (including sin) and God's all-encompassing causality, see Thomas Aquinas, Summa Theologiae, I-II, Question 79, Article 2 (the article is titled "Is the act of sin from God?"). The works of Garrigou-Lagrange on Grace and Predestination are also very illuminating on this subject. If you can read Latin, you may also be interested in the works of Domingo Banez as well as Norbert del Prado.