Two‐phase immiscible fluids in a two‐dimensional micro‐channels network are considered. The incompressible Stokes equations are used to describe the Newtonian fluid flow, while the Oldroyd‐B rheological model is used to capture the viscoelastic behavior. In order to perform numerical simulations in a complex geometry like a micro‐channels network, the volume penalization method is implemented. To follow the interface between the two fluids, the level‐set method is used, and the dynamics of the contact line is modeled by Cox law. Numerical results show the ability of the method to simulate two‐phase flows and to follow properly the contact line between the two immiscible fluids. Finally, simulations with realistic parameters are performed to show the difference when a Newtonian fluid is pushed by a viscoelastic fluid instead of a Newtonian one. Copyright © 2015 John Wiley & Sons, Ltd.