Abstract: A water-in-oil invert emulsion drilling mud is prepared with a nitrogen-containing compound, as a brine solution in the aqueous phase, to prevent the hydration of subterranean formation clays. Suitable nitrogen-containing compounds include alkali metal, alkaline-earth metal and ammonium nitrates and nitrites, and hydrates and complexes thereof. The nitrogen-based invert emulsion mud of the present invention eliminates the use of calcium chloride in the prior art invert emulsion drilling muds, thereby reducing the environmental impact of the drilling operation.