The story of Joseph in Genesis 37-50 helps us undersatnd the relation between God's sovereignty (His complete control over all things) and human sin.
Joseph's brothers treated him terribly. They hated him (37:4) and wanted him dead (37:18). They attacked him, threw him down a pit, then sold him to some passing slave traders (37:18-28). It seems that the only thing that kept them from killing him was the opportunity of making money by selling him as a slave (37:26). They then return and lie to their father, telling him that Joseph has been killed by a wild animal. What they do is a horrific evil, and is utterly repulsive in God's eyes.
However, none of this is outside of God's control. Instead, as we work through the story we see exactly the opposite, that God is in complete control, even over their sin. In fact, their sin is part of God's good purposes for His people, which includes Joseph's brothers (who are to go on to be the heads of the tribes of Israel). Joseph's brothers even end up being saved because of their sin. In God's purposes Joseph ends up as the prime minister of Egypt, who is in complete control over rations of food in a time of great famine. This means that he is able to provide food for his family, including his brothers, when they are struck hard by famine. Joseph delivers his family from death, and ensures their security. He would not have been in a position to do this had his brothers not done such a great evil by selling him off for a bit of extra pocket money.
This was not God just making the best of a bad situation, doing the best He could with the mess that Joseph's brothers had made. God ordained their sin to happen as part of His good purposes for His glory and the good of His people. Joseph makes this clear in 50:20 when he says, "you meant evil against me, but God meant it for good, to bring it about that many people should be kept alive, as they are today." On the one hand Joseph's brothers plotted and planned and purposed evil against Joseph. However, all of this was part of God's purposes. He planned this for good, to save His people. God did not make the best of a bad situation, He ordained that this should happen as part of His good purposes. Joseph is not ashamed to hold together both God's utter sovereignty and control over all things and human responsibility, their evil is not excusable.
Not only this but the story also draws attention to the glory of God's grace. In His sovereign purposes, the evil that Joseph's brothers committed end up for their good, and bringing about their deliverance. Does that not make us marvel at God's sovereign grace and His unfathomable wisdom.
If we move to the New Testament we see the same pattern. At the heart of the Bible is the most horrific sin ever committed, the slaughter of the Son of God on the cross. This is a horriffic evil, yet the cross has been planned by God since before the foundation of the world. at the cross both Jew's and Gentiles (representing the whole world) united together against Jesus to put Him to death (Acts 4:27). Yet, they did what God's "hand and...plan had predestined to take place." (Acts 4:28). The most horriffic human sin was planned by God from eternity past for the ultimate good, to bring glory to God by the saving of a people for Himself to all eternity. Not, only this but this horriffic evil was purposed for the inestimable good of those who comitted it. Acts 4 sees the rulers of both Jews and Gentiles as representative of the whole world united in putting Jesus to death. Yet, this great evil has been purposed by God to bring eternal salvation to people from all nations, tribes and tongues, both Jew and Gentile.
Ought this not to lead us to rejoicing in the inestimable riches of God's grace? Does this not make us join with Paul in saying: "Oh, the depth of the riches and wisdom and knowledge of God! How unsearcheable are his judgements and how inscrutable his ways!...To Him be glory forever.Amen" (Romans 11:33, 36).