The three-dimensional (3D) multiporous structure polyimides were obtained by introducing of the triphenylamine (TPA) unit as linkage in the pyromellitic-based polyimide (N1) and the naphthalene-1,4,5,8-tetracarboxylic-based polyimides (N2), respectively. Then, the functional polyimides were explored as the anode of lithium ion batteries instead of as traditional cathode. As a result, the obtained triphenylamine-based polyimides exhibited a good reversible capacity and remarkably improved rate performance. Especially for the porous N1, it delivered a gradually increased capacity of up to 349 mAh/g during the cycle testing and a rate capacity of 400 mAh/g at an even high current density of 500 mA/g. Significant electrochemical performances for the triphenylamine-contained polyimide could be ascribed to the unique polyimide chemical structure and the constructed 3D multiporous structure with the high surface area (738 m2/g for N1 and 456 m2/g for N2), which benefited to excellent Li+ diffusion kinetics in porous electrode. This makes it promising as anode of rechargeable batteries with the remarkably electrochemical performances.