The excessive use of plastic, especially polystyrene (PS), has caused serious environmental pollution. The efficient utilization of plastics and the conversion of plastics into value-added carbon materials are the concerns of researchers. Herein, we propose novel “pyrolysis–deposition” method to convert one popular plastic substance, PS, into ordered mesoporous carbons (OMCs). During the synthesis process, PS is pyrolyzed into small organic gases under high temperature, which is then adsorbed through capillary adsorption into the mesoporous of SBA-15 in the presence of catalyst. The obtained OMCs have high specific surface area, uniform pore size, and ordered pore structure. The OMCs exhibit specific capacitance of 118 F/g at a current density of 0.2 A/g and electrochemical stability of 87.2% at a current density of 2 A/g after 5000 cycles. The pyrolysis–deposition strategy provides a new idea to convert waste plastics into high-performance carbon materials for electrochemical applications.