Guru Hargobind ji is the sixth guru who succeeded his father Guru Arjan Dev ji. After the martyrdom of his father, he picked up the sword and armed his sikhs with the tools and knowledge in order to defend themselves. He did not want sikhs to go through the torture that his father Guru Arjun Dev ji went through.
Guru Sahib was the father of the seventh Guru Hari Rai ji and ninth Guru Tegh Bahadur ji, who put down the sword to immerse himself in devotional worship. Guru Sahib’s grandson Guru Gobind Singh ji went through the same phase as his grandfather, his father, Guru Tegh Bahadur ji was martyred by the Mughals and so he too picked up the sword.