Catastrophic outburst floods carved amphitheater-headed canyons on Earth and Mars, and the steep headwalls of these canyons suggest that some formed by upstream headwall propagation through waterfall erosion processes. Because topography evolves in concert with water flow during canyon erosion, we suggest that bedrock canyon morphology preserves hydraulic information about canyon-forming floods. In particular, we propose that for a canyon to form with a roughly uniform width by upstream headwall retreat, erosion must occur around the canyon head, but not along the sidewalls, such that canyon width is related to flood discharge. We develop a new theory for bedrock canyon formation by megafloods based on flow convergence of large outburst floods toward a horseshoe-shaped waterfall. The model is developed for waterfall erosion by rock toppling, a candidate erosion mechanism in well fractured rock, like columnar basalt. We apply the model to 14 terrestrial (Channeled Scablands, Washington; Snake River Plain, Idaho; and Ásbyrgi canyon, Iceland) and nine Martian (near Ares Vallis and Echus Chasma) bedrock canyons and show that predicted flood discharges are nearly 3 orders of magnitude less than previously estimated, and predicted flood durations are longer than previously estimated, from less than a day to a few months. Results also show a positive correlation between flood discharge per unit width and canyon width, which supports our hypothesis that canyon width is set in part by flood discharge. Despite lower discharges than previously estimated, the flood volumes remain large enough for individual outburst floods to have perturbed the global hydrology of Mars