九字真言最早見於東晉葛洪著作《抱朴子內篇·登涉》，係入山用到嘅護身辟邪之術，稱為「六甲祕祝」：
The nine-character mantra was first seen in Ge Hong's book "Hug Puzi Inner Chapter Dengshi" in the Eastern Jin Dynasty, which is a technique used to protect oneself and ward off evil · in the mountain, called "Rokuka Secret Blessing":