Bhishma, born as Devavrata, was a noble character, who vowed celibacy throughout his life. He was devoted to serving his father and thus received a boon that gave him the power to choose his time of death.
When he got injured in the Kurukshetra war, he chose not to die until the auspicious day of Magha Shukla Panchami arrived. When it did, he gave up his life at his own will.