The 55-year-old departs Old Trafford with United sitting 19th in the Premier League, having won just one league match all season.
West Ham host second-placed Stoke City on Saturday, with 11 points separating two sides heading in sharply contrasting directions in the Championship.
United have activated the one-year option in their captain's deal, tying him to Old Trafford until 2028, though a summer sale remains possible and his fitness for Saturday is in doubt.
The Como midfielder is on Manchester United's radar as a potential successor to Bruno Fernandes, though Champions League football will be central to any decision.