Thermally expanded graphite (TEG) is used as a template for precipitation of polyaniline from an aqueous solution of aniline hydrochloride and sodium persulfate used as an oxidant. In the first case, the TEG sample is used without treatment, in the second case the TEG sample is activated by ultrasonication before the polyaniline precipitation. Raman spectroscopy shows the formation of polymer layers on the surface of graphene layers. Near-edge X-ray absorption fine structure and X-ray photoelectron spectroscopy reveal the influence of the TEG ultrasonication on the chemical state of polyaniline in the hybrid. This material shows a large specific capacitance in a 1 M H2SO4 electrolyte due to the Faradaic processes in the polyaniline and high stability during the cycling.