A lattice Boltzmann color-fluid model, which was recently proposed by Liu et al. (2012) based on a concept of continuum surface force, is improved to simulate immiscible two-phase flows in porous media. The new improvements allow the model to account for different kinematic viscosities of both fluids and to model fluid–solid interactions. The capability and accuracy of this model is first validated by two benchmark tests: a layered two-phase flow with a variable viscosity ratio, and a dynamic capillary intrusion. This model is then used to simulate liquid CO2 (LCO2) displacing water in a dual-permeability pore network. The extent and behavior of LCO2 preferential flow (i.e., fingering) is found to depend on the capillary number (Ca), and three different displacement patterns observed in previous micromodel experiments are reproduced. The predicted variation of LCO2 saturation with Ca, as well as variation of specific interfacial length with LCO2 saturation, are both in reasonable agreement with the experimental observations. To understand the effect of heterogeneity on pore-scale displacement, we also simulate LCO2 displacing water in a randomly heterogeneous pore network, which has the same size and porosity as the simulated dual-permeability pore network. In comparison to the dual-permeability case, the transition from capillary fingering to viscous fingering occurs at a higher Ca, and LCO2 saturation is higher at low Ca but lower at high Ca. In either pore network, the LCO2–water specific interfacial length is found to obey a power-law dependence on LCO2 saturation.