A route for producing polyaniline nanotubes using the inner eggshell membrane as a template is demonstrated. Because the template substitutes the inner eggshell membrane with the outer eggshell membrane in the same reaction process, the resulting morphology of polyaniline correspondingly changes. A series of experimental results indicate that the pore size of the template plays a key role in the formation of the polyaniline nanotubes. By imaging the template before, during, and after the polymerization, a possible formation condition and process of polyaniline nanotubes is proposed. Meanwhile, fiber mats imitating an eggshell membrane-electrospun poly(vinyl alcohol) (PVA) fiber mats-are successfully used as a template for synthesizing polyaniline nanotubes in the same polymerization process. Using the PVA fiber mats as the template for different pore size and using an electrospinning method for different hours, respectively, the resulting morphology of the polyaniline correspondingly changes. When the pore size of PVA fiber mats is similar to that of the inner eggshell membrane, polyaniline (PANI) nanotubes can be obtained. The high surface areas, small diameter, and porous nature of the PANI nanotubes give significantly better performance in both gas sensitivity and time response. The gas-responses to trimethylamine, ammonia, and hydrazine are examined at room temperature. Compared with polyaniline prepared without a template, the polyaniline nanotubes prepared using the imitating template show higher selectivity and quicker response to trimethylamine gas. Meanwhile, the reversible circulation response change of polyaniline nanotubes has a reasonable reproducibility and has more potential applications in the area of sensor development.