Carbon dioxide geological sequestration is a key method to alleviate global warming and enhance oil recovery, where the three-phase displacement processes of oil, water, and carbon dioxide gas in porous media are frequently encountered. In this study, a three-phase three-dimensional lattice Boltzmann method coupled with special wettability and outlet boundary schemes is adopted to simulate the three-phase displacement processes in porous media. The method is validated by the contact angles on a curved surface and droplet flowing through the outlet boundary. With this method, the influences of capillary number, wettability, and local large pores on three-phase flow are investigated. In particular, different dynamic behaviors of fluids are observed at the pore scale, such as bypass-double displacement, stop-wait displacement, burst displacement, snap-off trapping, and corner flow. Further, Euler number and oil saturation are calculated to quantitatively characterize the fluidic morphology and displacement efficiency under different conditions. For all three phases, the Euler number of low capillary number, strong water-wet, and structures with large and medium pores is relatively low, indicating that the morphology of fluids is more connective. For enhancing oil recovery efficiency, high capillary number and strong water-wet structures are beneficial.