In 1926 Rogers Hornsby was traded by the Cardinals to the Giants. This was right after he hit .424 in 1924 (record high in baseball) and (I think) .401 in 1925. He went on for many years winning batting championships. - and in 1929 hit .380 while with the Cubs. This is still a team record in Chicago.
He played until 1937, finishing that season with a .321 batting average.
Connie Mack as manager/owner of the Philadelphia Athletics built championship-caliber teams, then wound up in dire financial straits and traded his best players for relative unknowns and (for the time) big bucks.
Future Hall of Famers traded by the A’s in the mid-1930s included Jimmie Foxx and Lefty Grove (to the Red Sox) and Mickey Cochrane (to the Tigers). All (especially Foxx and Grove) had plenty of good baseball left.
This doesn’t count the earlier fire sale in which Al Simmons and other A’s players were dealt to the White Sox for cash.
Charlie Finley traded Reggie Jackson to the Orioles in 1976. Jackson played one season for the O’s, then went to the Yankees, where he had a little bit of success.
Patrick Roy, goalie for the Montreal Canadiens, traded to the Colorado Avalanche on December 6, 1995. Roy helped lead the Avs to the Stanley Cup in their first season after moving from Quebec, where they were known as the Nordiques, to Denver.
Ron Francis, THE star player for the Hartford Whalers (and to the point where his nickname was Ronnie Franchise and had been since his rookie season), was traded on March 4th, 1991 to the Pittsburgh Penguins. Francis went on to help the Penguins win their first Stanley Cup less than three months later AND become repeat champs a year later.
This is the prime example, for me. As a Man United fan, I thought £80m for Ronaldo at the time was a good deal for Man U. Now, I don’t think it was. Ferguson sold Ince, Kanchelskis, Hughes, and Beckham at exactly the right times, but he got it wrong (with hindsight) with Ronaldo. Of course, if a player wants to leave there’s very little you can do to stop them and you could say he did well to get fair value.
Ronaldo would never have achieved the heights he has with Real Madrid with United, the hard tackling culture of the Premiership would have kept him in check.
I think the Expos trading him to Boston really fits the criteria the OP is looking for. He was All Star in 96-97 and won the 97 Cy Young award before Montreal traded him. He wasn’t even a starting pitcher in LA.
Its interesting, but outside the Barca contingent, the best players in Spain in the past few years have all come from the Premiership at their peak, CR7, Xabi Alonso, Mascherano, Bale, Suarez, Modric.
OTH, the La Liga players who have done well in England are those who went to the EPL as promising young players, like Alonso, Fabregas, Silva, Mata, Arteta. Of the established players, only Torres did well.
Technically, LeBron James was traded to Miami, but NBA sign-and-trades probably aren’t in the spirit of the OP. So I’ll say Carmelo Anthony, even though I personally have gone back and forth over whether he’s overrated or not.
To use another example of a top notch player at/near his prime who was traded just before he became a free agent… the Seattle Mariners traded Randy Johnson to Houston, since he was playing out his option. He went to the Diamondbacks at the end of the season.
David Cone was also traded from the Mets to the Blue Jays. And he was traded from the Blue Jays to the Yankees.
Cone was a hell of a pitcher but he’s not exactly at the level of Tom Seaver, though.
Baseball has lots of examples of top flight players traded mid contract. This year the Blue Jays alone acquired both David Price and Troy Tulowitzki. Tulowitzki was acquired in part by trading away Jose Reyes, who had been acquired in a trade from Florida when he was still a top flight player, along with Mark Buerhle, another very good player. The Royals, who beat the Blue Jays in the ALCS, countered the Price move by getting Johnny Cueto, a top flight pitcher.