A detailed study on the intercalative polymerization of aniline within different layered inorganic acid hosts (HNb3O8, HTiNbO5, and HSr2Nb3O10) and the conformation and electrochemical properties of the resulting nanocomposites is presented. Two different mechanisms are proposed for the polymerization of monomers within the confined intralamella, initiated by chemical oxidants or microwave irradiation. The orientation of the aromatic rings and the extent of oxidation and protonation of the interlayered polyaniline (PANI) is closely related to the different layer properties. To emphasize the controlled structure–property relationship, the nanocomposites are modeled as “porous electrolytes” and analyzed by equivalent circuit, cyclic voltammetry (CV), and charge–discharge measurements. Compared with the nanocomposites in which the aromatic rings are parallel with the inorganic slabs, the nanocomposites in which the aromatic rings are perpendicular to the slabs demonstrate higher conductivity, electroactivity, and discharge capacity. In the latter, a good 2D channel for the insertion/desertion of ions was provided and simultaneously more ions could be reserved within a relatively wider space. A charge–discharge mechanism is suggested for the chemical reaction in the Li/PANI nanocomposite battery and is in good agreement with the experimental facts.