Azathoth is an Outer God in Lovecraft's Cthulhu Mythos. It is almost always said to be "too horrible to even be described" and is the ancestor of almost all of the other deities or beings in this mythology, including Cthulhu, Nyarlathotep, Yog-Sothoth and others.
It is also known as the Nuclear Chaos, the Daemon Sultan and the Blind Idiot God.
When his ex-fiancé, Rumi, fell into a PTSD-induced coma after the death of her parents from a home invasion, Maruki was consumed by an unstable amount of grief. Preceded by a series of migraines, a voice reached out to him. This voice, implied to be a primitive form of his Persona, offered him its power, stating that they would together change the world to suit his ideology. Maruki accepted this power in his desperation, believing that he could induce a change of heart in Rumi to purge the distortion of her trauma, and the voice obliged; it altered her cognition through a power dubbed 'Actualization', changing her heart but at the cost of her memories being shuffled into something completely unrecognizable.
After the funding for his research of cognitive psience was pulled by Masayoshi Shido, Maruki fell further into depression. Despite this, he continued, applying his mysterious ability to psychotherapeutic counseling in order to help those suffering as he did to Rumi - among his patients was Sumire Yoshizawa, whom he subconsciously made to believe was her dead sister to help her cope with her survivor's guilt.
On the Day of Reckoning, if the protagonist maxed Maruki's confidant prior to November 19th, Yaldabaoth's fusion of Mementos and Tokyo into the Qliphoth World finally grants the formless Persona the catalyst it needed to awaken and gain physical form as Azathoth, granting it conscious control over Maruki's Actualization ability. The death of Yaldabaoth then causes the Phantom Thieves to subconsciously shift Maruki into the administrative power vacuum, granting him power equal to that of the God of Control and amplifying Azathoth to the point that the Persona is able to completely hijack the remains of Mementos and partially hijack its user as well. Now holding thrall over the cognition of the masses, Maruki puts his plan into motion, using an unknown Palace taking the form of a Laboratory in Odaiba and connected to Mementos as his base of operations.
With the immense power of Azathoth's Actualization, he begins to grant the wishes of the masses, beginning with those of the Phantom Thieves, since they are the closest to him and he knows all of their subconscious desires from their counseling sessions. When the protagonist rejects Maruki's ideal reality, he drives Sumire whom he previously held hostage insane, then ensnares her with a device connected to Mementos, driving her Persona Cendrillon berserk and causing it to attack the party in an attempt to ward them off.
Once the party reaches Maruki's Treasure Room, located in the tree of the Pscientific Model Eden, Maruki dons his Metaverse outfit and summons Azathoth to attack them. Unlike most other Personas, Azathoth takes a consistent form and either it or Maruki must be defeated for the battle to progress. Maruki will conjure three primary tentacles in battle, each with their own skills - one of them will minimize all damage dealt to Maruki to negligible levels. In the second phase, Azathoth will enlarge and grow several arms from its tentacles, as well as gain access to a wider roster of gimmicks, including tentacles that shuffle weaknesses, movement restrictions against the party, Evil Smile, attacking twice in a turn with powerful Bless and Physical attacks, Piercing Strike and Tyrant Chaos. Once it is defeated, Maruki seems to be defeated with his Palace collapsing, only to fuse it and his Treasure into Adam Kadmon and resume attacking the party due to his desperation to hold onto his version of reality.
Despite being a creature of Lovecraftian lore and Nyarlathotep's minions appearing in Maruki's Palace, Azathoth does not appear to have any relations with Nyarlathotep and seems to be a standalone Persona.
Azathoth is the "Blind Idiot God" with no sense or sight, while Adam Kadmon is the personification of infinite wisdom, which happen to contradict with each other. Considering that Azathoth becomes Adam Kadmon once fused with the guiding torch that acts as Maruki's Treasure, Azathoth's evolution into Adam Kadmon may symbolize the Messiah complex, which Maruki develops upon becoming Tokyo's administrative power after Yaldabaoth's death. This "madness through wisdom" is kickstarted by the protagonist teaching him the basics of Mementos and the Collective Unconsciousness.
Azathoth also holds a similar premise as the Demiurge for being the ignorant creator god of the material world, although the Demiurge is merely ignorant while Azathoth completely lacks any thought process whatsoever. Interestingly, the Kabbalah proclaims Adam Kadmon to also be the Demiurge.
It might also be based on a corruption of the Azoth, the essence of creation and the cure to all in Alchemy. Azathoth giving humanity an ideal world to live in using Takuto can be considered a cure for all suffering. Azoth is also the motivation towards physical and spiritual perfection, which Azathoth violates to achieve its own version of perfection, creating imperfection by stunting humanity's growth as a result.
Azathoth's tentacles transform into Adam Kadmon's innards upon its evolution. They also share a similar coloration as the Necronomicon. Coincidentally, both Maruki and Futaba's mother shared the same occupation.
According to an official interview in the P5R Official Complete Guide, Azathoth, as well as all of the other Lovecraftian entities in Maruki's Palace, are used to represent that it and the dream world it creates are all artificial, being created by the imagination of man just like the Cthulhu Mythos they are from.