A method of extracting hydrocarbons in situ from an underground hydrocarbon deposit such as oil shale. A selected part of the deposit is heated by one or more electrical induction coils arranged in a quasi-toroidal configuration to temperatures high enough to drive off hydrocarbon fractions as gases or vapors, which are then collected and utilized in surface operations or recovered for transportation or temporary storage. The deposit may optionally be heated through a coking and cracking stage. Any remaining hydrocarbons may be burned in situ and the combustion gases utilized for energy. Steam may be obtained by injecting water into the heated shale after extraction of the hydrocarbons.