The Black Book is a Zebra tome of dark magic.
The Black Book is a tome that contains the recipes for various dark spells -- the most notable of which is how to create Soul Jars. It also has information on blood magic and types of necromancy. The book itself has a sinister presence that seemingly tempts its current owner into reading it and learning its dark secrets.
Owning the book can be dangerous as it seems to have a detimental effect upon anyone who was exposed to it for a prolonged period of time. The most notable victim of this phenomenon being a zebra courier who chewed his own hooves off after he brought the book into Equestria.
Before & During the War
The Black Book was originally hoof-crafted by a zebra alchemist, considered insane by his people at large. The Black Book's whereabouts during its creation are unknown, likely passing to various owners over the years. The book was smuggled into Zebratown during the war, but when the one carrying the book was apprehended, the book was confiscated and taken by the Ministy of Image.
The book appears to have driven its courier mad as he was shown to have chewed through his own hooves to the bone, evidently dying of blood loss, as described by Midnight Shower in her personal journal. Rarity, after acquiring the Black Book, began to study it, learning various necromantic and soul related magics, and in particular, the method of creating soul jars which she used th split her own soul into 43 pieces to be used in making the Statuettes.
Rarity began seeking ways to destroy the Black Book, which all failed miserably. Even Spike's dragon fire couldn't destroy the tome, which was teleported to Celestia, much to Rarity's horror. Celestia returned the book, after studying it herself and learning some of the magic's it taught, i.e. the Soul Jar spell. The Book survived the war, stored in a desk drawer within the Ministry of Images' Canterlot Hub by Rarity.
After the War/Present Day
The Goddess learned of the Black Book and sought to use it as a way to extend her influence across the entirety of the Equestrian Wasteland, employing several Alicorns a decade earlier to infiltrate the ruins of the old capital to find the book, unknowing that the Pink Cloud would serve to disrupt her telepathic link with them in the process. Over the course of ten years, the Alicorns that were sent in were unable to find the book at all, fighting against an assortment of horrors from the Broadcasters to the Canterlot Ghouls. Elder Cottage Cheese of the Steel Rangers also learned of the Black Book as well, planning to use it to solidify his soul in a bid for immortality and stave off death. The Steel Rangers he sent into Canterlot in order to get the book came closer than the Alicorns did before dying at the hands of Taint-infected Parasprites found only within the Ministry of Image: just outside of the elevator shaft that lead up to Raritys' office.
Littlepip acquired the Black Book during her trip to Canterlot and nearly lost it to the alicorn Nightseer as she tried to access the Palace in order to detonate a Spell in a Box meant for the source of Pink Cloud. Littlepip killed Nightseer and retained ownership of the book, resisting the urge to read it herself until she brought the Black Book to Maripony as per her arrangement with The Goddess.
Littlepip knew The Goddess wouldn't keep her word and would likely try to absorb Littlepip or turn her into an Alicorn drone. Littlepip however used a Balefire Bomb she acquired from Red Eye to destroy Maripony and The Goddess. She left the Black Book behind too, where it was either destroyed or buried under a mountain of rubble. Despite this, the effects of the Books knowledge survived within Littlepip, where she was able to manifest Swords and Daggers made out of solidified blood as weapons.
In other Stories
It has been suggested that Goldenblood may have had a similar book, perhaps even a copy of the same book. It is not known whether multiple copies exist, but a possible explanation for this is that the author of the Black Book, made multiple Soul Jars: considering the nature of the book, it would be no surprise that the author had no qualms about splitting his soul multiple times.
The Black Book also appears in the possession of a zebra fortune teller during the early days of the Great War. The newly formed Macintosh Marauders meet the zebra at a funfair near Chapel and learn that they will all die on the battlefield within a year. The zebra then alters their fate using the book's magic, but informs them that they will all suffer terrible fates should they break their fellowship. When Big Macintosh does, he dies a quick painless death during the Battle of Shattered Hoof Ridge, but his teammates all suffer as predicted.