Oil−water relative permeability can be regarded as one of the important parameters to study the flow characteristics in the nanoporous media of shale. Considering the slip boundary and the difference of viscosity between the near-wall fluid and bulk fluid, the flow equation in the nanotube is established based on the Hagen−Poiseuille equation. The fractal theory is used to upgrade the relative permeability model in a single nanotube to that in shale porous media. The proposed model considers slip length, viscosity of the near-wall fluid, pore structure, total organic carbon (TOC) content, wettability, and capillary pressure. This is the first model that predicts the relative permeability for the oil−water two-phase flow in mixed-wet shale. In addition, the proposed model can identify the difference of flow mechanism in inorganic and organic pores. The model of the two-phase relative permeability in nanoporous shale is validated by experimental data. The results show that the influence of slip length on the relative permeability is greater than that of the viscosity of the near-wall fluid. The oil relative permeability decreases with the increase of the TOC content. The relative permeability of oil phase reduces with the decrease of the contact angle for oil in the inorganic pore. At the same saturation, with the increase of the fractal dimension of pore size distribution (D f ), the oil relative permeability increases, while the water relative permeability reduces. The increase of capillary force can improve the relative permeability of the oil phase. When the pore size is larger than 100 nm, the effect of nanoscale on improving the oil relative permeability can be negligible.