Lees has struggled to fulfil his early promise and dropped down the pecking order at Emerald Headingley.
The 25-year-old has initially signed for Durham on loan for the rest of the season and is available for their County Championship Division Two game against Glamorgan at Sophia Gardens next Sunday.
“I think naturally there’s a bit of disappointment,” said Lees, a former Yorkshire one-day captain. “I’ve probably been an important part of the team for the past five years or so, and to now be leaving makes it bitter-sweet.
“Under Jason Gillespie (the previous coach), I probably flourished, but the last 16 months I just haven’t been as fluent as I’d have hoped to be.
“It has been quite difficult and I haven’t played much cricket, which I’ve found quite tough with my rhythm and fluidity, but I think a new challenge, a new set of players, new checkpoints and targets is something I’m looking forward to.”
Reflecting on his happiest times at Headingley, Lees said: “There are a few standout moments, and the obvious one is winning back-to-back Championships. Getting my county cap is something I dreamed of from a very young age, and captaining the club at a very young age; that sort of experience can only put me in good stead moving forward down the line.
“During that period we were a top team, and I played a role in winning those Championships and that coincided with my cap and captaincy; it was a really great period for me.”
Since scoring 102 against Surrey at The Oval last September Lees has managed 79 runs in 12 first-class innings at an average of 6.58.
In 82 first-class matches for the club in total he scored 4,528 runs at 35.10 to go with 1,109 one-day runs in 42 games at 29.97.
Commenting on the player’s departure, Martyn Moxon, Yorkshire’s director of cricket, said: “It’s very much a case of mixed feelings. We’d very much prefer Alex to be scoring runs for us, but, obviously, this season things haven’t worked out for him.
“Having discussed it at length with him I think it’s generally felt by Alex and us that, for his future career, it’s probably the right move. We wish him well and every success going forward.”