The Niagara River, as is the entire Great Lakes Basin of which the river is an integral part, is a legacy of the last Ice Age. 18,000 years ago southern Ontario was covered by ice sheets 2-3 kilometres thick. As they advanced southward the ice sheets gouged out the basins of the Great Lakes. Then as they melted northward for the last time they released vast quantities of melt water into these basins. Our water is "fossil water"; less than one percent of it is renewable on an annual basis, the rest leftover from the ice sheets.
The Niagara Peninsula became free of the ice about 12,500 years ago. As the ice retreated northward, its melt waters began to flow down through what became Lake Erie, the Niagara River and Lake Ontario, down to the St. Lawrence River, and, finally, down to the sea. There were originally 5 spillways from Lake Erie to Lake Ontario. Eventually these were reduced to one, the original Niagara Falls, at Queenston-Lewiston. From here the Falls began its steady erosion through the bedrock.
However, about 10,500 years ago, through an interplay of geological effects including alternating retreats and re-advances of the ice, and rebounding of the land when released from the intense pressure of the ice (isostatic rebound), this process was interrupted. The glacial melt waters were rerouted through northern Ontario, bypassing the southern route. For the next 5,000 years Lake Erie remained only half the size of today, the Niagara River was reduced to about 10% of its current flow, and a much-reduced Falls stalled in the area of the Niagara Glen.
About 5,500 years ago the melt waters were once again routed through southern Ontario, restoring the river and Falls to their full power. Then the Falls reached the Whirlpool.