Sura 27 of the Quran is entitled The Ant (Al-Naml). In this Sura we read the following passage regarding Solomon’s exchange with an ant:
27:15 We endowed David and Solomon with knowledge, and they said, “Praise GOD for blessing us more than many of His believing servants.” 27:16 Solomon was David’s heir. He said, “O people, we have been endowed with understanding the language of the birds, and all kinds of things have been bestowed upon us. This is indeed a real blessing.” 27:17 Mobilized in the service of Solomon were his obedient soldiers of jinns and humans, as well as the birds; all at his disposal.
[ 27:18] When they approached the valley of the ants, one ant said, “O you ants, go into your homes, lest you get crushed by Solomon and his soldiers, without perceiving.” 27:19 He smiled and laughed at her statement, and said, “My Lord, direct me to be appreciative of the blessings You have bestowed upon me and my parents, and to do the righteous works that please You. Admit me by Your mercy into the company of Your righteous servants.”
At first glance, such an exchange might appear to be more suited in the land of science fiction and not what one would expect in a Holy Scripture that is from God. But it is passages like this that provide assurances to believers that the Quran has been untampered since its revelation over 1400 years ago.