  We study the nonadiabatic dynamics of a two-dimensional higher-order
topological insulator when the system is slowly quenched across the
boundary-obstructed phase transition, which is characterized by edge band gap
closing.
  We find that the number of excitations produced after the quench exhibits
power-law scaling behaviors with the quench rate. Boundary conditions can
drastically modify the scaling behaviors: The scaling exponent is found to be
$\alpha=1/2$ for hybridized and fully open boundary conditions, and $\alpha=2$
for periodic boundary condition. We argue that the exponent $\alpha=1/2$ cannot
be explained by the Kibble-Zurek mechanism unless we adopt an effective
dimension $d^{\rm eff}=1$ instead of the real dimension $d=2$. For comparison,
we also investigate the slow quench dynamics across the bulk-obstructed phase
transitions and a single multicritical point, which obeys the Kibble-Zurek
mechanism with dimension $d=2$.
