Microscale gas flow attracts significant research interest in recent years since it is concerned with a wide range of engineering applications. It is noted that the Navier–Stokes equations-based scheme and the standard lattice Boltzmann method both encounter a great challenge in the simulation of such flows. The newly developed discrete unified gas kinetic scheme (DUGKS) has been demonstrated to be capable of modeling microflows, but presently it is mainly limited to the problems with straight boundaries. In this study, the ghost-cell (GC) immersed boundary method is introduced to the DUGKS for handling curved boundaries. The most attractive feature of the GC method is to set a ghost point inside the solid domain, at which the information is unknown and will be extrapolated linearly from the corresponding wall and image nodes. As for the two latter points, the distribution functions are first evaluated by the inverse distance weighted (IDW) method and then should be corrected according to the impenetrability condition and Maxwellian diffuse-scattering rule. Three typical test cases, including the plane Poiseuille flow, cylindrical Couette flow and flow through porous media are simulated to validate the present IDW-GC-DUGKS. The results demonstrate the accuracy and feasibility of the method for the gaseous microflows.