We report a facile strategy to synthesize polyaniline/molybdenum disulfide (PANI/MoS2) nanocomposite by in situ polymerization to achieve excellent electrochemical properties for application as supercapacitor electrodes. MoS2 nanocomposite with graphene-like subunits structure is prepared by a hydrothermal method and serves as an excellent 2D conductive skeleton that supports a highly electrolytic accessible surface area of redox-active PANI and provides a direct path for electrons. The layered nanostructure of PANI/MoS2 composites provides a larger contact surface area for the intercalation/deintercalation of protons into/out of active materials and shortens the path length for electrolyte ion transport. The structure of the composite is characterized by scanning electron microscope, transmission electron microscope, X-ray powder diffraction, Fourier transform infrared spectroscopy, and thermogravimetric analysis, and the electrochemical performances of the composites are evaluated by cyclic voltammogram and galvanostatic charge–discharge. The maximum specific capacitance of 575Fg−1 at 1Ag−1 is observed at the PANI/MoS2 electrodes. The energy density of 265Whkg−1 is obtained at a power density of 18.0kWkg−1. In addition, the PANI/MoS2 composite electrode shows excellent long-term cyclic stability (less than 2% decrease in specific capacitance after 500 cycles at a current density of 1Ag−1), indicating a positive synergistic effect of MoS2 and PANI for the improvement of electrochemical performance.