Mamoru is a monkey shikigami that was hatched by Nanami Momozono as a test given to her by Otohiko to see if she was ready to attend the Divine Assembly in Izumo.
When Nanami received the egg from Otohiko, she was supposed to have hatched it in 7 days, but due to an argument between her and Tomoe, the egg was accidentally stepped on and cracked by Mizuki. Afterwards, he began to hatch and even though he was premature, Mamoru already had the form of a small monkey.
Nanami kept Mamoru with her after that so that he could continue to grow off of her chi. Three days after he hatched, Nanami was attacked in the library by a yokai and had to be rescued by Tomoe. As a result of being exposed to miasma, Momaru became ill from Nanami's depleted chi.
Later, Otohiko scolded Nanami on her poor responsibility as a Shikigami caster, and told her to stop mass producing talisman and to think of her Shikigami as one instead. He told her to think of the power that she most desired, and Nanami chose "to protect" which became the name/ability of her Shikigami, "Mamoru".
(Source: Kamisama Hajimemashita Wikia)