The enhanced oil recovery technique of low-salinity (LS) water flooding is a topic of substantial interest in the petroleum industry. Studies have shown that LS brine injection can increase oil production relative to conventional high-salinity (HS) brine injection, but contradictory results have also been reported and an understanding of the underlying mechanisms remains elusive. We have recently developed a steady-state pore network model to simulate oil recovery by LS brine injection in uniformly wetted pore structures (Watson et al., Transp. Porous Med. 118, 201-223, 2017). We extend this approach here to investigate the low-salinity effect (LSE) in heterogeneously wetted media. We couple a model of capillary force-driven fluid displacement to a novel tracer algorithm and track the salinity front in the pore network as oil and HS brine are displaced by injected LS brine. The wettability of the pore structure is modified in regions where water salinity falls below a critical threshold, and simulations show that this can have significant consequences for oil recovery. For networks that contain spanning clusters of both water-wet and oil-wet (OW) pores prior to flooding, our results demonstrate that the OW pores contain the only viable source of incremental oil recovery by LS brine injection. Moreover, we show that a LS-induced increase in microscopic sweep efficiency in the OW pore fraction is a necessary, but not sufficient, condition to guarantee additional oil production. Simulations suggest that the fraction of OW pores in the network, the average network connectivity and the initial HS brine saturation are key factors that can determine the extent of any improvement in oil recovery in heterogeneously wetted networks following LS brine injection. This study highlights that the mechanisms of the LSE can be markedly different in uniformly wetted and non-uniformly wetted porous media.