The striker made just 14 appearances and failed to score a goal after his £2.2m move from Blackburn Rovers in January last year.
The South African, 33, would have received a further £2.3m if he had opted to sit out his £38,000-a-week contract until it expired in June 2012.
Down and out: McCarthy's woeful spell in east London has come to an end
West Ham club tried to send him out on loan in January but Championship sides were put off by his high wages. He was fined £200,000 after failing to adhere to a weight-loss regime and was left out of Avram Grant's 25-man Premier League squad.
Source: Daily Mail