A method of electromagnetic heating in situ recovers liquid hydrocarbons from an oil shale formation containing kerogen in an inorganic matrix where the formation is substantially impermeable to fluids under native conditions. A block of the oil shale formation is substantially uniformly heated in situ with electromagnetic power to a temperature of about 275.degree. C. where there is pyrolysis of a portion of the kerogen to gas and shale oil at a pressure sufficient to overcome the capillary pressure of the shale oil in the matrix, thereby providing substantial fluid permeability to the formation. The gas thereupon escaping from said block and the shale oil driven thereby are recovered, thereby further increasing the permeability of the formation. The magnitude of the electromagnetic power is controlled to raise the temperature of the block relatively slowly to increase the rate of pyrolysis of the kerogen as the permeability of the formation increases to produce gas at pressures above the necessary to overcome the capillary pressure and below that at which there is substantial escape of the gas bypassing shale oil within the formation rather than driving the oil before it.