ٱلْأَنْعَام : ٨٨

  • ذَٰلِكَ That
  • هُدَى (is the) Guidance
  • ٱللَّهِ (of) Allah
  • يَهۡدِي He guides
  • بِهِۦ with it
  • مَن whom
  • يَشَآءُ He wills
  • مِنۡ of
  • عِبَادِهِۦۚ His slaves
  • وَلَوۡ But if
  • أَشۡرَكُواْ they (had) associated partners (with Allah)
  • لَحَبِطَ surely (would be) worthless
  • عَنۡهُم for them
  • مَّا what
  • كَانُواْ they used to
  • يَعۡمَلُونَ do
That is the guidance of Allāh by which He guides whomever He wills of His servants. But if they had associated others with Allāh, then worthless for them would be whatever they were doing.
That, religion to which they were guided, is God's guidance wherewith He guides whom He will of His servants; had they, hypothetically speaking, been idolaters, all that they did would have been in vain.