Inhomogeneity-induced magnetoresistance (IMR) reported in some non-magnetic semiconductors1, 2, 3, 4, 5, 6, 7, 8, particularly silicon1, 6, 7, 8, has generated considerable interest owing to the large magnitude of the effect and its linear field dependence (albeit at high magnetic fields). Various theories implicate9, 10, 11, 12, 13, 14, 15, 16, 17, 18 spatial variation of the carrier mobility as being responsible for IMR. Here we show that IMR in lightly doped silicon can be significantly enhanced through hole injection, and then tuned by an applied current to arise at low magnetic fields. In our devices, the ‘inhomogeneity’ is provided by the p–n boundary formed between regions where conduction is dominated by the minority and majority charge carriers (holes and electrons) respectively; application of a magnetic field distorts the current in the boundary region, resulting in large magnetoresistance. Because this is an intrinsically spatial effect, the geometry of the device can be used to enhance IMR further: we designed an IMR device whose room-temperature field sensitivity at low fields was greatly improved, with magnetoresistance reaching 10% at 0.07T and 100% at 0.2T, approaching the performance of commercial giant-magnetoresistance devices19, 20. The combination of high sensitivity to low magnetic fields and large high-field response should make this device concept attractive to the magnetic-field sensing industry. Moreover, because our device is based on a conventional silicon platform, it should be possible to integrate it with existing silicon devices and so aid the development of silicon-based magnetoelectronics.