Bhishma Pitamaha was defeated and grieviously wounded by Arjuna. But since he could choose the time of his death as per the boons received by him, he choose to die in uttarayana and was waiting for the auspicious time. Meanwhile the war was over leading to the death of all male members in the family except the pancha Pandavas and the unborn child of Abhimanyu. Yudhisthira the eldest of the Pandavas became the King of Hastinapura, and whom else would he go for advise other than Bhishma Pitamaha. Anushasanika Parva is in the form of questions and answers between yudhisthira and Bhishma. This is how we find the thousand names of Lord Vishnu introduced in the Mahabharata.
Ans: PAVITRANAM PAVITRAM YO MANGALANAM CA MANGALAM DAIVATAM DEVATANAM CA BHOOTANAM YO AVYAYAH PITA
He who is the very sanctity that sanctifies all sacred things; he who is most auspious; he who is the god of gods; he who is the eternal father of all creatures is the one God-VISHNU.
Que 2. KIMVAPYEKAM PARAYANAM?
Who is the one refuge for all?
Ans: PARAMAM YO MAHAT TEJAH PARAMAM YO MAHAT TAPAH PARAMAM YO MAHAT BRAHMA PARAMAM YAH PARAYANAM
He who is the great effulgence; he who is the great controller; he who is the Supreme all pervading Truth; he who is the Highest Good the Lord Vishnu.
Que 3. STUVANTAM KAM PRAPNUYUH(MANAVAH SHUBHAM)?
By glorifying whom can man reach the auspiciousness(peace and prosperity)?
Ans: JAGAT PRABHUM DEVA DEVAM ANANTAM PURUSHOTTAMAM STUVAN NAMA SAHASRENA PURUSHAH SATATOTTHITAH
The Supreme Personality of God is the controller of all moving and non-moving beings in the universe, and He is the worshipable master of all the demigods. His transcendental forms and qualities are unlimited, and He is the best of all persons.One should always glorify Him by enthusiastically chanting His Thousand Holy Names(Visnu-Sahasranama).
Que 4: (KAM ARCANTAH) PRAPNUYUH MANAVAH SHUBHAM?
By worshipping whom can a man reach auspiciousness(peace and prosperity)?
Ans: TAMEVA CA ARCAYAN NITYAM BHAKTYA PURUSHAM AVYAYAM STUVAN NAMA SAHASRENA PURUSHAH SATATOTHITAH
By meditating upon, by worshipping and by prostrating at the same Purusha, man can reach the Auspiciousness.
Que 5: KO DHARMAH SARVA DHARMANAM BHAVATAH PARAMO MATAH
What is, in thy opinion, the greatest Dharma?
Que 6: KIM JAPAN MUCYATE JANTUH JANMA SAMSARA BANDHANAT?
By doing japa of what can creatures go beyond the bonds of samsara?
Both questions are answered here;- the greatest Dharma is the one Vishnu, who has neither a beginning nor an end, the supreme lord of the world. All creatures can go beyond the bonds of samsara, and he goes beyond all sorrows who daily chants the Sahasranamas .
The Supreme is described as the form which the whole world of names and fames has risen in the beginning of the creation, that in which the world continues to exist, that into which alone this world can merge back during the dissolution; this is VISHNU.
After answering all the questions Bheeshma said to Yudhisthira; "This is how the sacred hymn called as "The Thousand Names of Lord Vishnu", is introduced in the Mahabharata.
It starts with- VISHWAM VISHNUH Here is a video of Vishnusahasranamam