The immersed boundary method with discrete direct forcing approach was combined with a direct numerical simulation (DNS) code to study the time-dependent response of boundary-layer flow over a flat plate to the active vortex generators (AVG) that consist of a pair of deployable circular wing lip type blades driven by a pre-defined duty cycle. The DNS code solves the three-dimensional Navier–Stokes equations for compressible flow in general curvilinear coordinates using a fully implicit LU-SGS method. A fourth-order finite difference scheme is used to compute the spatial derivatives. The underlying curvilinear mesh near the vortex generator is designed properly with a large portion of the immersed boundary intersecting with the grid nodes to reduce the number of near-boundary nodes that require interpolation. The current immersed boundary technique was tested and verified on backward-facing step flow and flow past a circular cylinder. Numerical experiments have shown that the discrete direct forcing approach is very effective. In numerical simulation of flow behind the AVG, the computational results are comparable to the experimental data.