Here is the story as told in the Book of Daniel:
Shadrach, Meshach and Abednego replied to the king, "O Nebuchadnezzar, we do not need to defend ourselves before you in this matter. If we are thrown into the blazing furnace, the God we serve is able to save us from it, and he will rescue us from your hand, O king. But even if he does not, we want you to know, O king, that we will not serve your gods or worship the image of gold you have set up."In addition to the account in the canonical Book of Daniel, there are some additional materials, The Prayer of Azariah and Song of the Three Holy Children, found in the Catholic and Orthodox Bibles which provide more information about this story.
Then Nebuchadnezzar was furious with Shadrach, Meshach and Abednego, and his attitude toward them changed. He ordered the furnace heated seven times hotter than usual and commanded some of the strongest soldiers in his army to tie up Shadrach, Meshach and Abednego and throw them into the blazing furnace. So these men, wearing their robes, trousers, turbans and other clothes, were bound and thrown into the blazing furnace. The king's command was so urgent and the furnace so hot that the flames of the fire killed the soldiers who took up Shadrach, Meshach and Abednego, and these three men, firmly tied, fell into the blazing furnace.
Then King Nebuchadnezzar leaped to his feet in amazement and asked his advisers, "Weren't there three men that we tied up and threw into the fire?" They replied, "Certainly, O king." He said, "Look! I see four men walking around in the fire, unbound and unharmed, and the fourth looks like a son of the gods."
Nebuchadnezzar then approached the opening of the blazing furnace and shouted, "Shadrach, Meshach and Abednego, servants of the Most High God, come out! Come here!" So Shadrach, Meshach and Abednego came out of the fire, and the satraps, prefects, governors and royal advisers crowded around them. They saw that the fire had not harmed their bodies, nor was a hair of their heads singed; their robes were not scorched, and there was no smell of fire on them.
Then Nebuchadnezzar said, "Praise be to the God of Shadrach, Meshach and Abednego, who has sent his angel and rescued his servants! They trusted in him and defied the king's command and were willing to give up their lives rather than serve or worship any god except their own God. Therefore I decree that the people of any nation or language who say anything against the God of Shadrach, Meshach and Abednego be cut into pieces and their houses be turned into piles of rubble, for no other god can save in this way."
The story of the three men in the fiery furnace provides the inspiration for this Johnny Cash song, The Fourth Man In The Fire:
They wouldn't bendNow, let's slide back in time from Johnny Cash to the Middle Ages! Here is an illustration showing the story of the boys in the fiery furnace taken from a late fifteenth-century manuscript of Augustine's City of God.
They held on to the will of God so we are told
They wouldn't bow
They would not bow their knees to Idols made of gold
They wouldn't burn
They were protected by the Fourth Man in the fire
They wouldn't bend
They wouldn't bow, they wouldn't burn.
Now the prophet Daniel tells about
Three men who walked with God
Shadrach, Meshach and Abednego
Before the wicked king they stood
And the king commanded them bound and thrown
Into the fiery furnace that day
But the fire was so hot that the men were slain
That forced them on their way.
Now when the three were cast in and the king rose up
To witness this awful fate
He began to tremble at what he saw
In astonished tones he spake
Did we not cast three men bound
Into the midst of the fire
Well, Lo, I see four men unhurt
Unbound and walkin' down there;
There's Shadrach, Meshach and Abednego
And the fiery coals they trod
But the form of the Fourth Man that I see
Is like the Son of God.