Hematite is primarily formed through the precipitation of dissolved iron in marine environments. The mineral also arises via volcanism and contact metamorphism.
Hematite is one of the most predominant terrestrial minerals that naturally occurs in igneous, metamorphic and sedimentary rocks. The solidification of dissolved iron into hematite is driven by bacterial action, which occurred billions of years ago. Primordial marine microorganisms that were capable of photosynthesis released oxygen as a by-product of the process. The oxygen reacted with the dissolved iron to form hematite. This resulted in the deposition of the mineral on the bottom of Earth's oceans where it eventually gets washed to the shorelines.
Volcanic activity also contributes to hematite formation through a crystallization process that occurs during magma differentiation. This causes hematite to be intruded or extruded into various igneous rocks. Hematite forms in metamorphic rocks through contact metamorphism when hot molten material combines with nearby rocks.