Rafiq will leave at the end of the season when his current contract expires.
It is the second time that the 27-year-old will have been released. Yorkshire let him go in 2014 due to a loss of form only to take him back in 2016. However, after failing to win a regular place, Rafiq will now seek another county.
“I am, of course, very disappointed by this decision,” he said. “I understand that it is part and parcel of professional sport and tough decisions have to be made. It gives me the perfect opportunity for a completely fresh challenge with a new county where I can further my cricket and fulfil my potential and ambitions.”
Rafiq first played for Yorkshire in 2008 and deputised as captain in 2012, helping the club towards T20 Finals Day.
He was the first cricketer of Asian origin to captain Yorkshire and also led England U-17s.
Yorkshire have two leg-spinners on their staff in the form of Adil Rashid and new signing Josh Poysden, plus left-arm spinner Karl Carver.
Martyn Moxon, Yorkshire’s director of cricket, said it was not possible to offer Rafiq a new deal.
“This (decision) is part of our rebuilding process,” he said. “We’re having a really close look at areas in which we need to strengthen the squad and, crucially, within the budget we’ve got. Unfortunately, with that in mind, we’re not able to offer Azeem a contract extension.”
Yorkshire go into Monday’s County Championship game against Lancashire at Headingley second-bottom of Division One, one point behind their Roses rivals with a match in hand after securing a draw at Notts yesterday.