Random flux is commonly believed to be incapable of driving metal-insulator transitions. Surprisingly, we show that random flux can after all induce a metal-insulator transition in the two-dimensional Su-Schrieffer-Heeger model, thus reporting the first example of such a transition. Remarkably, we find that the resulting insulating phase can even be a higher-order topological insulator with zero-energy corner modes and fractional corner charges, rather than a conventional Anderson insulator. Employing both level statistics and finite-size scaling analysis, we characterize the metal-insulator transition and numerically extract its critical exponent as $ u=2.48pm0.08$. To reveal the physical mechanism underlying the transition, we present an effective band structure picture based on the random flux averaged Greens function.