The 31-year-old arrived at Upton Park from Marseille last summer, but has struggled to settle in England and last week hit out at manager Sam Allardyce for a lack of first-team action.
He has made one start in the Barclays Premier League after a thigh injury and spoke to the French media about his unhappiness, saying: "I have a three-year contract. I'm not unhappy financially, but I came to play, not to take an early retirement.
"I am positively at breaking point. At all the clubs where I've been, I've always had a discussion with the coach, so I know what he expected of me, how the team plays, my positioning.
"But since my arrival at West Ham I never spoke with the manager. Every day is 'Hello, goodbye'. There is no dialogue, no explanation."
Allardyce responded by saying Diarra just had to speak to him and it appears talks have now taken place, with the 44-cap France international heading off.
The departure comes shortly after Aston Villa defender Stephen Warnock revealed he had turned down the Hammers in favour of a move to Leeds, saying that the Yorkshire club had made him feel "wanted".