Grimbeard the Ghastly is a character that existed before the events of the books. He was first mentioned in How to Be a Pirate, the sequel to the book How to Train Your Dragon. He was not only the world's greatest pirate, but Hiccup's great-great grandfather as well. Grimbeard buried his vast treasure somewhere on the Isle of Skullions before his death, and Hiccup has to solve a riddle to find it before Alvin the Treacherous does. Hiccup finds the treasure underwater in a cavern with Alvin The Treacherous and Fishlegs but, the treasure is guarded by a Monstrous Strangulator. Grimbeard wielded a sword named Stormblade which he kept with him on all his journeys until it was lost and taken by Alvin the Treacherous who uses it to attempt to kill Hiccup.
Grimbeard was also mentioned in How to Ride a Dragon's Storm as winning the original swimming race in 3 months 5 days and 6 hours. For his prize Grimbeard asked for Murderous the Magnificent to be sacrificed to the Sky Dragons.
Grimbeard was married to Chinhilda. Grimbeard had three sons; Thugheart, Chucklehead and Hiccup Horrendous Haddock II. Grimbeard broke Chinhilda's heart when he abandoned newborn Hiccup on a mountainside. She is the ghost that haunts the bay. Hiccup II grew up with dragons after being rescued from starvation by them and years later Hiccup II returned and started the first Dragon Rebellion leaded by him and his brother Furious, it was meant to be a peaceful talk but it quickly turned into a massacre when Thugheart lied to Grimbeard about Hiccups intentions. Hiccup II was killed by Grimbeard, ran threw with Stormblade, Grimbeard realized what he'd done and tried to stem the blood but it was too late, Hiccup was dead and Grimbeard driven to madness. He died some time after the rebellion.
Chucklehead and his descendants became the chiefs of the Hooligan tribe and it is him Hiccup, Stoick, Baggybum and Snotlout are descended from. Thugheart was banished and formed the Outcast tribe and is it him that Alvin the Treacherous is descended from.