The Madison rises in Teton County in northwestern Wyoming at the confluence of the Firehole and Gibbon rivers , a location known as Madison Junction in Yellowstone National Park . It flows west then north through the mountains of southwestern Montana to join the Jefferson and Gallatin rivers at Three Forks . The Missouri River Headwaters State Park is located on the Madison at Three Forks . In its upper reaches in Gallatin County , Montana , the Hebgen Dam forms Hebgen Lake . In its middle reaches in Madison County , Montana , the Madison Dam forms Ennis Lake and provides hydroelectric power . In 1959 , the 1959 Hebgen Lake earthquake formed Quake Lake just downstream from Hebgen Dam . Downstream from Ennis , the Madison flows through Bear Trap Canyon , known for its class IV-V whitewater . The Bear Trap Canyon section is part of the Lee Metcalf Wilderness area
1959 Hebgen Lake earthquake
1959 Hebgen Lake earthquake
Madison River