There is a story associated with this hymn. It is said that one day Adi Shankara was walking along the streets of Varanasi with his disciples. He heard a very old scholar teaching the rules of Sanskrit grammar to his students. Taking pity on him, Shankara advised him to not waste time on the rules of grammar at this old age but to turn his mind to God in worship and devotion. The Bhajagovindam was said to be composed on this occassion.
In the composition, Shankara himself is said to have contributed 12 verses hence the first 12 verses of the hymn bear the title Dvadashamanjarika Stotram ( a hymn of 12 verses).The 14 disciples who were with the master are then said to have added one verse each.These verses are referred to as Chaturdashamanjarika Stotram (a hymn of 14 verses).
Adi Shankara is primarily known for his work on the doctrine of Advaita Vedanta - the unity of the Atman and the Nirguna Brahman. He is mainly understood as an advocate of Jnana Marga or the path of knowledge to attain liberation.However in the Bhajagovinda, he also stresses on the importance of Bhakthi or devotion to God as a means to spiritual development and to liberation from the cycle of birth and death. The prayer clearly states that the renunciation of our egotistical differences and surrender to God makes for salvation. Many scholars hold that this composition encapsulates the entire substance of all Vedantic thought found in whatever other works that Adi Shankara wrote.