Twisted-yarn-based artificial muscles can potentially be used in diverse applications, such as valves in microfluidic devices, smart textiles, air vehicles, and exoskeletons, because of their high torsional and tensile strokes, high work capacities, and long cycle life. Here, we demonstrate electrochemically powered, hierarchically twisted carbon nanotube yarn artificial muscles that have a contractile work capacity of 3.78 kJ/kg, which is 95 times the work capacity of mammalian skeletal muscles. This record work capacity and a tensile stroke of 15.1% were obtained by maximizing yarn capacitance by optimizing the degree of inserted twist in component yarns that are plied until fully coiled. These electrochemically driven artificial muscles can be operated in reverse as mechanical energy harvesters that need no externally applied bias. In aqueous sodium chloride electrolyte, a peak electrical output power of 0.65 W/kg of energy harvester was generated by 1 Hz sinusoidal elongation.