The device for pyrolysis of carbonaceous materials comprises a working chamber comprising a non-magnetic wall comprising an inner graphite lining; one or more electrodes adapted to be inserted within a carbon-based bedding; a solenoid coiled around the device exterior, the solenoid adapted to create a magnetic field within the working chamber such that when the solenoid is energized, the carbon-based bedding is caused to move; a lower solids outlet comprising an airlock, the solids outlet adapted to permit solids to exit the device; and a lower gas outlet adapted to permit gaseous substances to exit after having traveled through the carbon-based bedding. The method comprises the steps of loading carbon-containing materials into the working chamber; using the first and second electrodes to heat the carbon-containing materials by passing electric current through the carbon-containing materials without air access; collecting, cleaning and releasing gaseous pyrolysis products produced by the heating.