9 About noon the following day as they were on their journey and approaching the city, Peter went up on the roof to pray. 10 He became hungry and wanted something to eat, and while the meal was being prepared, he fell into a trance. 11 He saw heaven opened and something like a large sheet being let down to earth by its four corners. 12 It contained all kinds of four-footed animals, as well as reptiles and birds. 13 Then a voice told him, “Get up, Peter. Kill and eat.”14 “Surely not, Lord!” Peter replied. “I have never eaten anything impure or unclean.”15 The voice spoke to him a second time, “Do not call anything impure that God has made clean.”16 This happened three times, and immediately the sheet was taken back to heaven.17 While Peter was wondering about the meaning of the vision, the men sent by Cornelius found out where Simon’s house was and stopped at the gate. 18 They called out, asking if Simon who was known as Peter was staying there.19 While Peter was still thinking about the vision, the Spirit said to him, “Simon, three men are looking for you. 20 So get up and go downstairs. Do not hesitate to go with them, for I have sent them.”21 Peter went down and said to the men, “I’m the one you’re looking for. Why have you come?”22 The men replied, “We have come from Cornelius the centurion. He is a righteous and God-fearing man, who is respected by all the Jewish people. A holy angel told him to ask you to come to his house so that he could hear what you have to say.” 23 Then Peter invited the men into the house to be his guests. Acts 10:9-23
When's the last time you've been convinced that God wants you to disobey His word? Probably when you were really wanting to sin. "I know same sex relationships were wrong in the Old Testament but I live in the New". "God created me this way and I'm following Him according to His design." "He said His yoke isn't heavy and His burden is light so I should go with the easy not what drains life out of me.""God created marriage for man not man for marriage so let's get divorced because this isn't working.""I wasn't aware of God's plan for my life when I married him but now I know that this other guy and I were meant for each other.""Lying is the only way not to hurt her feelings and God wouldn't want me to hurt someone."
We can justify sinning any number of ways. Weren't Satan's temptations of Jesus something like the above? "God wouldn't want you starving." "God wants you to rule." "God won't let any harm come to you." Peter was being asked to sin here as far as he was concerned. There were Old Testament laws about unclean and clean food that he was being asked to violate yet God gives him a vision that it's OK. How does he know it's God not Satan? It is confirmed by a miraculous sign that God told strangers knocking at his door that there's a man named Peter living here who can tell them how to be saved. Satan doesn't want people saved. All I'm saying is if you think God is telling you to sin it better be confirmed by a miracle.
But actually, hadn't Jesus already declared that no food was unclean and that he had fulfilled that part of the Law?
“Are you so dull?” he asked. “Don’t you see that nothing that enters a person from the outside can defile them? For it doesn’t go into their heart but into their stomach, and then out of the body.” (In saying this, Jesus declared all foods clean.) Mark 7:18,19
The book of Mark was written by Mark who was taught by this very same Peter who was figuring this all out. The parenthetical statement at the end of those verses was saying that, "We didn't understand this back when He said it but since, thanks to this vision and miraculous confirmation followed by Holy Spirit validation on Cornelius (spoiler alert), we now know what Jesus was telling us."
Bottom line, if you think God is giving you an OK on a sin, He's not. You are trying to be master of your own life and you can't love God and disobey His word. You can't say "Yes, Lord" if you are Lord. Obet Him even when your flesh is dragging and kicking going the other direction. He knows what's best for you.