A unified pipe-network-based numerical manifold method (NMM) is developed to simulate immiscible two-phase flow in a geological medium. Both heterogeneous and non-heterogeneous geological media can be discretized as numerical pipe networks, which have high efficiency and accuracy in simulating fluid and mass transfer in fractured rock masses. A manifold element method is developed to solve the governing equations of immiscible two-phase flow in pipes. The developed NMM can simulate moving and deforming of two-phase flow interface. A grid-based front-tracking method updates the marker points constructing the fluid interface explicitly in each time step. The effectiveness of the NMM is verified through analytical and finite element analysis. Parametric studies are conducted by simulating immiscible two-phase flows with various fluid properties in homogeneous and inhomogeneous geological conditions. The results show that the developed method can efficiently simulate the moving interface of two-phase flow in geological media, including effects such as "viscous fingering", a noteworthy phenomenon in enhanced oil recovery. When the mobility of the driving fluid is larger than that of the driven fluid, the inhomogeneity of the medium can cause the fluid interface to roughen, which increases over time during the process of two-phase flow. For the inverse situation, although the fluid interface remains rough, the roughness variation throughout the process is not prominent.