Where the story is told
The story of Ibrahim and the fire is told mainly in Surah al-Anbiya (Quran 21:51-70). Other surahs add parts of the same story: al-An'am 6:74-83 gives his reasoning with his people, Maryam 19:41-48 gives his gentle words to his father, and al-Ankabut 29:16-27 and as-Saffat 37:83-98 repeat the main events.
The Quran introduces him by saying that Allah had given him sound judgement from early on and knew him well (21:51). Surah Maryam calls him a man of truth and a prophet (19:41).
Ibrahim calls his people to Allah
Ibrahim asked his father and his people what the statues were to which they were so devoted. They answered only that they had found their fathers worshipping them. He told them plainly that they and their fathers were in clear error (21:52-54). When they asked whether he was serious or joking, he said that their Lord is the Lord of the heavens and the earth, who created them (21:55-56).
Surah Maryam shows how kindly he spoke to his father. He asked why he worshipped what cannot hear or see or benefit him, said that knowledge had come to him which had not come to his father, and invited him to an even path (19:42-43). His father answered with a threat to stone him and told him to keep away. Ibrahim replied with a word of peace, said he would ask his Lord for him, and chose to call upon his Lord alone (19:46-48).
Surah al-An'am describes how he looked at a star, then the moon, then the sun, and said of each one 'This is my lord', until each one set. The meaning of the verses is that what disappears cannot be a lord. He then declared that he had turned his face to the One who created the heavens and the earth, and that he was not one of those who associate others with Allah (6:76-79). Many commentators explain this as his way of reasoning with his people and showing them the weakness of what they worshipped.
The idols are broken
Ibrahim swore by Allah that he would plan against their idols once the people had turned away (21:57). When they had gone, he broke the statues into pieces, except for the biggest one, so that they might return to it (21:58). Surah as-Saffat adds that he first asked the idols whether they would eat, and why they did not speak, and then struck them with his right hand (37:91-93).
When the people came back, they asked who had done this to their gods. Some said they had heard a young man called Ibrahim speaking about them, and he was brought before the people (21:59-61). Asked whether he had done it, he answered that the largest of them had done it, and told them to ask the idols if they could speak (21:63). Scholars understand this as a pointed argument meant to make the people admit the truth themselves.
For a moment the people turned to their own consciences and told one another, 'You are the wrongdoers.' But then they reversed themselves and said, 'You already know that these do not speak' (21:64-65). Ibrahim answered by asking whether they worshipped, instead of Allah, what can neither benefit nor harm them. He said 'Uff' to them and to what they worshipped, and asked if they would not use reason (21:66-67).
The fire
Their answer was force. They said, 'Burn him and support your gods, if you are going to act' (21:68). Surah as-Saffat says they told one another to build a furnace for him and throw him into the blazing fire (37:97), and Surah al-Ankabut says the only reply of his people was 'Kill him or burn him' (29:24).
Then Allah said, in the meaning of the verse: «قُلْنَا يَٰنَارُ كُونِى بَرْدًۭا وَسَلَٰمًا عَلَىٰٓ إِبْرَٰهِيمَ» (21:69). Allah saved him from the fire, and the Quran says that in this are signs for people who believe (29:24). They wanted to harm him, but Allah made them the greatest losers (21:70) and the most debased (37:98).
Ibn Abbas, may Allah be pleased with him, reported that the words 'Hasbunallahu wa ni'mal wakil' (Allah is enough for us, and He is the best protector) were said by Ibrahim when he was thrown into the fire, and by Muhammad ﷺ when people told him that others had gathered against him and that he should fear them. This only increased the believers in faith (Sahih al-Bukhari 4563).
After this Ibrahim left his people. Lut (Lot) believed him, and Ibrahim said that he would emigrate to his Lord (29:26). Allah later gave him Ishaq and Yaqub and placed prophethood and scripture in his descendants (29:27).
What the Quran does not tell us
The Quran does not describe how the fire was built, how large it was, who threw Ibrahim into it, or how long he stayed there. It does not name the ruler or give the date and place of the event in this passage. Popular retellings often add a catapult and other scenes, but these are not found in the Quran or in authentic hadith, so we do not rely on them.
The Quran gives us the result and the meaning: the people had every means of force, yet when Allah commanded the fire, it became coolness and safety. Fire burns only by Allah's permission.
Lessons from this story
- Stand for the truth with wisdom and kindness. Ibrahim spoke gently to his father even while disagreeing with him.
- Following ancestors is not proof. Ibrahim asked questions that made people think about what they worshipped (21:52-56, 21:66-67).
- Say 'Hasbunallahu wa ni'mal wakil' with real trust. It was the word of Ibrahim in the fire and of the Prophet ﷺ in a time of fear.
- Allah's help can come in ways that no one expects, and no harm reaches a person except by His permission.
- Plans against the truth do not last. Those who plotted against Ibrahim were the ones who lost (21:70).
General information for learning, not a fatwa. For your own situation, ask a qualified scholar.