She will play Osaka in Saturday's final after the world number three earlier ended Serena Williams' bid for a record-equalling 24th major title 6-3, 6-4.
The see-saw continued in the third set with breaks traded before Brady took control of Pegula's serve to reach the final four of a Grand Slam for the second time.
"She's (Barty) looking forward to playing against her. It's a great test because she is such a quality player, obviously improved out of sight from back then to where she is now."