In this work the problem of displacing a ganglion of a fluid by another immiscible one in capillaries is investigated. A modeling approach is developed to predict the location of the ganglion with time. The model describes two patterns; namely, when the ganglion totally exists inside the tube, and when the advancing interface of the ganglion has broken through the exit of the tube. The model is valid for the case in which the ganglion is wetting as well as when it is nonwetting to the wall of the tube. It also considers the situation in which both the advancing and the receding interfaces assume, generally, different contact angles. For the special case when the displacement process is quasistatic, both the receding and the advancing contact angles may be considered the same. Under these conditions, interfacial tension force plays no role and the ganglion moves as a plug inside the tube with a constant velocity. When the viscosity ratio between the invading fluid and the ganglion is one (i.e., both phases are having the same viscosity) the motion reduces to the Hagen-Poiseuille flow in pipes. Once the advancing interface breaks through the exit of the tube, interfacial tension starts to take part in the displacement process and the ganglion starts to accelerate or decelerate according to the viscosity ratio. When the ganglion is nonwetting, interfacial tension becomes in the direction of the flow and is opposite to the flow otherwise. The model accounts for external forces such as pressure and gravity in addition to capillarity. A computational fluid dynamics analysis of this system is conducted for both types of wettability scenarios and shows very good match with the results of the developed model during both the two modes of flow patterns. This builds confidence in the developed modeling approach. Other cases have also been explored to highlight the effects of other scenarios.