Granny Weatherwax in The Shepherd's Crown by Terry Pratchett.
This was the last book Sir Terry ever wrote before he died, the only one that says he "was" the author of Discworld instead of saying he "is" the author of Discworld. I didn't read it for a year after it came out because I didn't think I'd be able to get through it. When I eventually did, it hit hard in a way I never really expected.
Granny Weatherwax is a witch, the most well-known witch in all of Discworld. She's one of Pratchett's most beloved characters because of her iron will, rock solid sense of justice, and her belief that someone has to be there for the normal, everday people that the world seems to care so little for. She dies in Shepherd's Crown, passing away in her sleep. The bulk of the story is what the Witches do to adjust to a world without Granny Weatherwax in it.
Pratchett had other books he wanted to write after this one, so I know that he didn't know he was going to die, that this would be his last, but it's not possible for me to read this book as anything other than Pratchett preparing his readers for his own death. For the last fifteen years or so, many of the Discworld novels have featured characters in prominent positions in the world subtlely grooming other characters to take over for them. Watch Commander Sam Vimes seems set to be replaced by Captains Carrot (a six foot dwarf) and Angua (his werewolf girlfriend). Mustrum Ridcully, archchancellor of the wizard's university, seems to be grooming a young wizard unfamiliar with the hindering traditions of the faculty called Ponder Stibbons to succeed him. Lord Vetinari, the ruler of Ankh-Morpork, seems to be grooming con-man turned reluctant civil servant Moist Von Lipwig into a capable ruler. Running beneath everything else going on in Discworld is this recurring theme of continuation, that although some things inevitably end, there will always be someone to follow in the footsteps of heroes, their works will carry on, the things they taught us will endure beyond them. The Shepherd's Crown is explicitly about this, about how the Witches can continue to follow Granny Weatherwax's example even though she herself is gone, how her legacy will outlive her. The book is about dealing with the loss of a beloved mentor and friend and offers reassurance that the world won't stop turning, that life can and will go on, and that we are stronger people for having known these friends.
I can't read this book as anything other than Pratchett talking about himself and his own impending death. Of all his characters, Granny Weatherwax was the one most like Sir Terry himself, so the parallels draw themselves. None of his recurring characters have ever died before, so when Granny Weatherwax passed away it was a shock, almost more so since it happened so peacefully, not unlike Sir Terry's own death. This book is like a reassuring hug from the man himself, a final message telling us that it's not as bad as it feels, and reminding us one last time that a man is not dead while his name is still spoken.