The 1816 short story is titled The Nutcracker and the Mouse King and it has been adapted numerous times. Here is Wikipedia's brief summary of the original tale and its first adaptation:
A young Marie Stahlbaum's favorite Christmas toy, the Nutcracker, comes alive and, after defeating the evil Mouse King in battle, whisks her away to a magical kingdom populated by dolls. In 1892, the Russian composer Pyotr Ilyich Tchaikovsky and choreographers Marius Petipa and Lev Ivanov turned Alexandre Dumas père's adaptation of the story into the ballet The Nutcracker.
Source: www.disney.com/