A series of polyaniline/polyimide (PANi/PI) composite fibers was prepared via dry-jet wet spinning followed by in situ polymerization growth. The resultant composite fibers showed good mechanical properties with a tensile strength of 0.90GPa, a tensile modulus of 6.79GPa, and an elongation at break of 14.63%. Thermogravimetric and thermal mechanical analyses revealed that the composite fibers had considerably good thermal stabilities in air and nitrogen atmospheres, as well as good size stabilities at 50–150°C. Current–voltage curves indicated the transformation from electric insulation to electrical conductivity along the fiber axial direction. The composite fibers exhibited a sensitive response to immersion in solutions with different pH values. This work provides a simple approach to fabricate PANi/PI composite fibers that could be applied in the antistatic textile and military industries.