The impact of ordered vacancies on the dynamic stability of perovskites is investigated under the ab initio framework with a focus on cubic BaFeO3 (Pm3m) and vacancy-ordered monoclinic BaFeO2.67 (P2(1)/m). The harmonic approximation shows that both structures are dynamically unstable at 0 K. For the monoclinic structure, the instability is related to rotational distortions of the Fe coordination tetrahedra near the ordered vacancies. Ab initio molecular dynamics simulations in combination with the introduced structural descriptor demonstrate that both structures are stabilized above 130 K. Our results suggest that the ordered vacancies do not significantly alter the critical temperature at which Ba-Fe-O perovskites are dynamically stabilized. Furthermore, strong anharmonicity for the vacancy-ordered structure above its critical temperature is revealed by a significant asymmetry of the trajectories of O anions near the ordered vacancies.