The Dasam Granth consists of 1428 pages. According to all available evidence, it was compiled by Bhai Mani Singh, the devout and learned Sikh custodian of the Golden Temple (who later became a martyr) 26 years after the death of Guru Gobind Singh, at Damdama. But, some historians assert that it was not the adi Granth, but his own Book that the Guru dictated to Bhai Mani Singh. However, much of its secular portion is the subject of great controversy even amongst the Sikhs who ascribe its authorship not to the Guru but to some of his 52 poets who lived at his court.
The Contents of this Granth, which is mostly in Braj Bhasha, are (1) Jap, or meditations. (2) Akal Ustati, or the praises of God and the denunciation of ritual, superstition and cant, (3) Chandi Charitra, I and II, or the life of Chandi, the goddess of war, (in Braj) (4) Var, or ballad of Durga, the exploits of the goddess of war (in Punjabi), (5) Gyan Prabodh, or the sayings of Wisdom, which also include some tales from Mahabharta, (6) Chaubis Avtar, or the life-stories of the incarnations of Vishnu, according to the Hindus, and Brahrnavatar and Rudravtdr, (7) Shabd Hazare, or devotional hymns, (8) Thirty-three Swayyas, or the praises of the one immortal, unknowable God of wonder and grace, (9) Khalsa Mahima. or words in praise of the Khalsa, (10) Shastra Nam-Mala; verses in praise of many arms, (11) Charitro pkhyan or 404 tales of the wiles of women, (12) Zafar Namah (in Persian), or letter of victory, addressed to Aurangzeb, (13) Hikayats, or legends and tales, also in Persian, including some stories on the lines of Charitro pakhyan.
As soon as the Dasam Granth was compiled, it led to a great controversy among the Sikh divines, especially in relation to its secular portions and more notably in regard to the Charitro-pakhyan and Hikayats. It was decided to divide the book. Bhai Mehtab Singh of Mirankot (who was charged by the Panth to capture or assassinate Massa Ranghar who had then planted himself in the holy Golden Temple at Amritsar and was desecrating its sanctity) suggested to the leaders of his community that if he came back victorious in his mission, the book should be preserved in one volume, otherwise it may divided into two. Mehtab Singh was successful in putting Massa Ranghar to an ignoble death and hence the volume was preserved as it now is. This, however, as the Sikh savant, Bhai Kahan Singh points out, (See Gurmat Sudhakar, second edition, P.35) is a most arbitrary way of settling a point of such literary and theological significance. Moreover, a single man's point of view should not have prevailed, -especially of a military hero, or even a Jathedar in search of martyrdom, in preference to the viewpoint of the theologians and scholars who were still discussing the point. Several recensions of this volume are now current, some of which contain some extra hymns also. Though it is a pity that the text of the Dasam Granth has yet to be fixed by scholars and theologians, it is our considered opinion that the secular portion of what is now available in print is also the creation of the Guru himself, not only because of the internal evidence of style and diction, but also because the secular portion, including Charitro-pakhyan does not, by any chance, contradict the Guru's philosophy of a full-blooded, though detached life in all its manifestations. A supreme artist that the Guru was, he could not ignore to write about the seamy side of life, though he does not commend it anywhere.
To pick up on the Guru's extensive use of Hindu mythology, or the praises of Krishna's scintillating play on the flute, or the most sensitive portrayal of feminine beauty and charm, the inclusion of certain erotic scenes, or how, in the days of Ramayana, the Kashatryas worshipped the Brahmins, of the call of the heroes in some of the Hikiyats to bring them a cup of intoxicating wine, etc , and to disso-ciate the Guru from their authorship would be the height of artistic sacrilege. The Guru who, in his Akal Ustat (whose authorship anyhow is beyond doubt) can write this about God : "Now you are a beggar, now a King; now the reciter of the Gayatri, now the Muezzin giving "all to prayer; now the lover of own wife, now the lover of another woman; now you are the strong drink, now the drunkard," (6:16) could not but be a man of superbly catholic mind, seeing the variegated mani-festation of God in everything and everywhere. And was it not Guru Nanak who said '0 God, wondrous are those who tread Thy path and wondrous are those who are strayed away." (Var Assa). It is very difficult however, for puny, hide-bound minds to appreciate this grandeur of spiritual and aesthetic vision.
At present there is considerable controversy surrounding the authorship of parts of the collection of the writings of Guru Gobind Singh, the Dasam Granth. The history of this scripture is as follows:
The collected writings of Guru Gobind Singh are known as Dasam Granth ("Scripture of the Tenth Guru"). The writings of the poets in his court comprise a different scripture, known as Vidiya Sar ("Pool of Knowledge"). According to a famous history of the Sikhs written in 1843, Suraj Prakash ("Rising of the Sun"), 52 scholar-poets and 7 pandits always lived in the court of Guru Gobind Singh Ji. The writings of the poets were written on paper in fine script, and according to Suraj Prakash, the weight of this Vidiya Sar was "9 maunds."
On the night of 5 December 1705 AD, Guru Gobind Singh left his court in Anandpur, after a long siege by Hindu and Muslim armies. During this departure, the Guru's possessions, including both the Dasam Granth and Vidiya Sar, were carried away by the strong current of the flooding Sarsa stream. However, in those days it was customary to make copies of Guru Gobind Singh's writings and the writings of the poets. In addition to the 52 poets and 7 pandits, 39 scribes had lived in Guru Gobind Singh's court. Because of the faith of his devotees, copies of Guru Gobind Singh's writings always exceeded those of the poets, and these copies were kept safely with many devotees.
After Guru Gobind Singh left his mortal body in 1708, religious-minded people began trying to take care of his writings. First of all, Bhai Mani Singh Shahid (martyr), who was at that time Head Priest at Amritsar and also a great scholar, with great efforts collected the writings of Guru Gobind Singh and compiled one copy thereof.
Bhai Kesar Singh Chhibbar–whose family had been diwans (administrators) of the Gurus, including his great-grandfather who was diwan of the Seventh, Eighth, and Ninth Gurus, whose grandfather and father were diwans of Guru Gobind Singh, and who himself attended Mata Sundri Ji (wife of Guru Gobind Singh)–has written in his 1769 book known as Bansavalinama Dasan Patshahian Ka ("Lineage of the Ten Kings"), "This book which contained the life stories of avtars was compiled by Bhai Mani Singh. He provided travel expenses for various people. One Sikh brought a large amount of cash. That cash was used by Bhai Mani Singh to make payments to the Sikhs for expenses in searching for the writings of Guru Gobind Singh."
Only Mata Sundri, Bhai Mani Singh Shahid, and Bhai Shisha Singh (who stayed with Mata Sundri in Delhi and was compiling the Dasam Granth) can know about the authenticity of Dasam Granth. Later, Baba Deep Singh Shahid, Bhai Sukha Singh, and many other religious workers collected the writings of Guru Gobind Singh and edited the Dasam Granth. Among those birs (copies) of Dasam Granth, those written by Bhai Mani Singh Shahid, the one in the library of Sangrur, and the one in Moti Bagh Gurdwara, Patiala, are at present kept safely. The Dasam Granth preserved at Patna Sahib, the birthplace of Guru Gobind Singh, is also famous. But in these Dasam Granth birs, the banis (sacred writings) are not written in the same order, nor is their number equal. The reason is that as and when the devotees found copies of the writings, they included them in their collections. Those who had greater means for making these collections were certainly more successful in collecting more banis. But from those birs, many banis are the same and appear to be written from the same one source. It was due to the unavailability of proper means of collection that there were differences in the size and shape of the birs. At first people called the collection Bachittar Natak. Later is was known as Dasmen Patshah da Granth. But now the Holy Book is called Dasam Granth.
( Source: http://www.allaboutsikhs.com/scriptures/sri-dasam-granth-sahib.html )