This is from Bhagavad Gita: Chapter 4, Verse 11
ये यथा मां प्रपद्यन्ते तांस्तथैव भजाम्यहम् | मम वर्त्मानुवर्तन्ते
मनुष्या: पार्थ सर्वश: || 11||
ye yathā māṁ prapadyante tāns tathaiva bhajāmyaham mama
vartmānuvartante manuṣhyāḥ pārtha sarvaśhaḥ
ye—who; yathā—in whatever way; mām—unto
me; prapadyante—surrender; tān—them; tathā—so; eva—certainly; bhajāmi—reciprocate; aham—I; mama—my; vartma—path; anuvartante—follow; manuṣhyāḥ—men; pārtha—Arjun,
the son of Pritha; sarvaśhaḥ—in all respects
Translation
BG 4.11: In whatever way people surrender unto me, I reciprocate with
them accordingly. Everyone follows my path, knowingly or unknowingly,
O son of Pritha.
Commentary
Here, Lord Krishna states that he reciprocates with everyone as they surrender to him. For those who deny the existence of God, he meets them in the form of the law of karma—he sits inside their hearts, notes their actions, and dispenses the results. But such atheists too cannot get away from serving him; they are obliged to serve God’s material energy, Maya, in its various apparitions, as wealth, luxuries, relatives, prestige, etc. Maya holds them under the sway of anger, lust, and greed. On the other hand, for those who turn their mind away from worldly attractions and look upon God as the goal and refuge, he takes care of them just as a mother takes care of her child.
Shree Krishna uses the word bhajāmi, which means “to serve.” He serves the surrendered souls, by destroying their accumulated karmas of endless lifetimes, cutting the bonds of Maya, removing the darkness of material existence, and bestowing divine bliss, divine knowledge, and divine love. And when the devotee learns to love God selflessly, he willingly enslaves himself to their love. Shree Ram thus tells Hanuman:
ekaikasyopakārasya prāṇān dāsyāsmi te kape
śheṣhasyehopakārāṇāṁ bhavām ṛiṇino vayaṁ (Vālmīki Ramayan)[v14]
“O Hanuman, to release myself from the debt of one service you
performed for me, I shall have to offer my life to you. For all the
other devotional services done by you, I shall remain eternally
indebted.” In this way, God reciprocates with everyone as they
surrender to him."
And this is from narayana suktam(yajurveda)-
" dhāta purasthādyumudājahār shakrah pravidvāmpradishschatasraù
tmevam vidvānmrta iha bhavati nānanyaù pantha ayanāya vidyate
The one whom Brahma saw and revealed, whom Indra perceived in all four
directions, by knowing him I become immortal in this world. I know not
anyone other than him.
ōm sahasraśīrṣaṁ devaṁ viśvākśaṁ viśvaśambhuvaṁ, viśvaṁ nārāyaṇaṁ
devamakśaraṁ paramaṁ padam.
Aum, the god of infinite heads, the eyes of the universe, the source
of all existence, this universe itself, is Nayrayana, the imperishable
god, and the highest goal.
viśvataḥ paramam nityaṁ viśvaṁ nārāyaṇagï harim, viśvamevedaṁ
puruṣastadviśvamupajīvati.
The highest of all, the eternal, this very universe is Narayana, the
destroyer of sins, the Purusha, upon whom the universe and all this
subsists.
patiṁ viśvasyātmeśvaragï śāśvatagï śivamacyutam, nārāyaṇaṁ mahājñeyaṁ
viśvātmānaṁ parāyaṇam.
The ruler, supporter and protector, the lord of all the souls, the
eternally permanent, the auspicious, and the strong willed is
Narayana, the great one worthy of knowing, who is firmly devoted to
the souls of all the beings in the universe.`
Both Bhagavad Gita and Narayana Suktam agree that once you devote yourself to Narayana - Narayana reciprocates by devoting himself to well-being of his devotee, by destroying your karma - your sins (thus the name hari) and Maya and thus lead you to spiritual enlightenment. :D