Arjan's central achievement was the compilation, in 1604, of the Adi Granth, the first authorised scripture of the Sikhs. Working at Ramsar with the scribe Bhai Gurdas, he gathered the hymns of the five Gurus before and including himself and set beside them the compositions of Hindu and Muslim bhakti poets, Kabir, Ravidas, Namdev, Sheikh Farid and others, arranging the whole not by author but by raga, the musical mode in which each hymn is sung.
The compilation was an act of deliberate editorial judgement, not mere collection. Pashaura Singh and others, working from the surviving Kartarpur manuscript and its antecedents, have shown Arjan selecting, ordering and in places setting aside material, shaping a canon. He installed the completed volume in the Harmandir Sahib with the aged Baba Buddha as its first granthi, giving the community a fixed scripture at its physical centre. A century later the tenth Guru would add a final layer and close it as the eternal Guru.