Our unlucky protagonist, Jin, uses the trunk of a sacred tree to carve a statue for a school project. When he takes it outside, to his surprise it begins absorbing the surrounding earth and transforms into, hold your breath on this one, a girl! So like all similar setups this guardian deity is pretty pissed that her tree was cut down and lives with Jin while she takes out her anger on squashing bugs....er, cleaning the "Impurities".
Kannagi has also a "deformed" version named Kanpachi and was created by the original author's brother. It's worth a look.