The left arm spinner has struggled to gain full recovery from sepsis he picked up during the tour of New Zealand in November 2019. Leach later also suffered from gastroenteritis and flu ahead of the first Test against South Africa at Centurion last month.
The Somerset spinner has failed to attain the level of fitness required for selection.
"It has been an unfortunate time for Jack with illness and since the Test series in New Zealand six weeks ago, he hasn't been able to get 100 per cent fit," England head coach Chris Silverwood was quoted as saying by ecb.co.uk.
"This has hampered his preparation in South Africa and despite his best endeavours he is not in a position to make himself available for selection for the final two Test matches. He is a great lad to have around the squad and his infectious personality and popularity will be missed. However, his focus has to be getting himself better and receiving the optimum levels of recovery and treatment, which is best served back in England without any distractions," he added.
Silverwood hoped that Leach would soon regain full fitness and would likely recover in time for the England tour of Sri Lanka in March.
The four-match Test series between England and SOuth Africa is currently levelled at 1-1 and the third contest will kick-off from January 16 in Port Elizabeth.
( With inputs from IANS )