Graphite primarily forms through regional metamorphism of organic-rich sedimentary rocks, particularly black shales. The high temperatures and pressures of metamorphism transform the carbonaceous material into crystalline graphite. This is the most common geological process for graphite formation.