It generally occurs associated with the weathering products of magnesium containing minerals such as serpentine or brucite. It occurs as incrustations and vein or fracture fillings in ultramafic rocks and serpentinites.
It occurs in hydrothermally altered dolomite and marble. It commonly appears in caves as speleothems and "moonmilk", deposited from water that has seeped through magnesium rich rocks. It is the most common cave carbonate after calcite and aragonite. It thermally decomposes, over a temperature range of approximately 220°C to 750°C, releasing water and carbon dioxide leaving a magnesium oxide residue.