Arjan Dev had been named Guru by his father; this made his brother Prithi Chand jealous, and the two never got along well at all for the rest of their lives. At some point Prithi Chand began passing off his own verses as the verses of Guru Nanak (the founder of the Sikh way of life), and when Arjan Dev became aware of this, he realized that there was a pressing need for some sort of official collection of the writings of the Gurus. He sent messengers to various places and people associated with prior Gurus in an attempt to collect the authentic writings of the early Gurus, and then, having collected together as much as he could, he sat down to compile and edit them into a book. In keeping with Sikh principles going back to Guru Nanak himself, he included poetry from the Muslim Sufi and the Hindu Bhakti traditions.This book, or Granth, was investigated by Emperor Akbar; but Akbar found nothing dangerous to Islam about it, and so had done nothing.
When Akbar died, however, civil war overtook the land. Akbar had named his grandson Khusro his successor, but his son Jahangir seized the throne and Khusro fled. Khusro came to Guru Arjan as someone unfriended and in need; the Guru, in accordance with Sikh principles and his custom of hospitality, gave him money for travel expenses. Khusro, however, was soon captured by Jahangir.
Through the machinations of Prithi Chand and his allies, the Emperor Jahangir came to the Punjab, where they were able to convince him that the Guru had deprived Prithi of his rightful place as Guru (one can imagine how sympathetic Jahangir would have been, given that in his eyes he, too, had been deprived of his rightful place) and that he was attacking the Hindu and Muslim religions. Prithi died while the Emperor was visiting, but his son Meharban passed on the story of Arjan's succor to Khusro, and continued the slander against the Guru, saying that the Guru's book was full of blasphemous attacks against Hindu and Muslim worship. Jahangir ordered that Arjan be brought before him in Lahore and all his property confiscated.
Before he left for Lahore, the Guru invested his son Hargobind as his successor. Told to erase everything in the Granth that had anything to do with Hinduism or Islam, Arjan refused, saying, according to some sources:
I am a worshipper of the Immortal God. There is no monarch save Him; and what He revealed to the Gurus, from Guru Nanak to Guru Ram Das, and afterwards to myself, is written in the holy Granth. The hymns contained in the Adi Granth are not disrespectful to any Hindu incarnation or any Mohammadan prophet. It is certainly stated that prophets, priests, and incarnations are the handiwork of the Immortal God, Whose limit none can find. My main object is to spread the truth and the destruction of falsehood; and if, in pursuance to this objective, this perishable body is to depart, I shall account it great good fortune.
Guru Arjan Dev was tortured with fire and boiling water. He is said to have accepted it all as God's will, saying over and over, "Your will is sweet; I ask for the gift of the Name." At one point he was granted a request, to be bathed. He was dipped in a river, and his body disappeared -- according to some, carried away by the currents, never to be seen again; according to others, it blended with the light.*
* It occurs to me that someone who has no acquaintance with Sikhism might not quite catch the meaning of this point. In Sikh doctrine, to put it very roughly, Guru Nanak, the original Guru, passed along his Jot, i.e., his divine light or union with God, to his successor; one way in which this is sometimes described is that Guru Nanak 'converted his body into a new form'. Thus every Guru was, in a sense, Guru Nanak, not physically, but in the sense that he carries on Guru Nanak's light. So the light here is divine light. Thus, one's own light blending with the divine light is a common Sikh expression describing union with God; the notion of Guru Arjan Dev's body blending with the light goes a bit further, and different Sikhs will use the symbol differently in telling the story, I'm sure.