Ander Herrera will leave Manchester United when his contract expires at the end of the season.
The news was confirmed on social media on Saturday after widespread speculation about his future.
The 29-year-old Spain midfielder, who joined the club under Louis van Gaal from Athletic Bilbao in 2014, is understood to have agreed terms with Paris St-Germain.
United did attempt to keep Herrera but there was no agreement over terms.
Irritated at the time it took the Old Trafford club to make an offer, Herrera then asked for a wage in line with the club's highest earners.
United felt it was too much, so Herrera will bring to an end his five-year stay at the club this weekend.
It is not known whether Herrera will play any part in Sunday's final Premier League game against Cardiff at Old Trafford.
He scored 20 goals in 189 appearances and won the FA Cup, League Cup and Europa League.
In an emotional video, Herrera, who won the Sir Matt Busby Player of the Year award in 2017, voted for by United fans, said "there is red in my heart".
He added: "Playing for the greatest club in England has been a true honour. Every time I represented this club, in every game, in wins and losses, even when I couldn't help from the grass, I understood what this clubs means."