In this study, a new online compensation of torque sharing function (OCTSF) method is proposed to minimise the torque ripple in switched reluctance motors (SRMs). For SRMs, the torque ripple is a serious issue which is mainly produced by the overlapped conduction phases in the commutation region. In conventional TSF-based direct instantaneous torque control system, the incoming phase torque cannot achieve its reference torque perfectly and the outgoing phase torque also cannot drop down to its torque reference quickly in the commutation region. Hence, in order to minimise the torque ripple, the TSF of the outgoing phase is proposed to realise the positive compensation at the start of the commutation and the TSF of the incoming phase is used to achieve the negative compensation at the end of the commutation. Moreover, compared with the hard-chopping mode in conventional TSF strategies, the hard-chopping and soft-chopping modes are both employed in the proposed scheme to reduce the switching actions and switching loss. The simulation and experiments based on a 750 W three-phase 12/8 SRM are carried out to verify the effectiveness of the proposed OCTSF method.