The Chestnut King by A. N. Wilson

A young boy who has discovered a house full of magical cupboard doors must confront a spreading darkness that threatens his home and the many worlds beyond the portals; traveling through strange lands with friends and family, he uncovers hidden lineage and unexpected abilities, faces moral choices and personal sacrifice, and leads a final stand to protect what he loves while learning the true meaning of courage and belonging.