The Bible’s answer
There are some prayers that God does not answer. Consider two factors that would cause God to ignore a person’s prayer.
1. The prayer goes against God’s will
God does not answer requests that go against his will, or his requirements, which are in the Bible. (1 John 5:14) For example, the Bible requires that we avoid being greedy. Gambling promotes greed. (1 Corinthians 6:9, 10) So, God will not answer your prayer if you pray to win the lottery. God is not a genie that you can summon to do your bidding. Actually, you can be thankful for this. Otherwise, you might have to fear what others could ask God to do.—James 4:3.
2. The person praying acts rebelliously
God does not listen to those who are determined to offend him by their actions. For example, God told those who claimed to serve him but acted rebelliously: “Even though you make many prayers, I am not listening; with bloodshed your very hands have become filled.” (Isaiah 1:15) But if they had changed their ways and “set matters straight” with God, he would have listened when they prayed to him.—Isaiah 1:18.