Ali, 33, said he had taken the decision to focus only on Test cricket and also because he felt the time was right.
"I have spoken to the chief selector, captain and the chairman of PCB before announcing my decision. I took the decision after giving it a lot of thought," he told reporters in Lahore.
A prolific player in the longest format, the 33-year-old played the last of his 53 ODIs against New Zealand in January, earlier this year.
His orthodox batting style in ODIs at an average of 36.90 and strike-rate of 74.45 has often come up for criticism.
"I just want to pay full attention to Test cricket now and I think the young players now coming into the team are performing very well in one-day internationals," he added.
Ali, who had to step down as captain of the ODI team last year, however felt that he could have done more in 50-over cricket.
"I think I could have contributed some more in one-day cricket but with the World Cup due next year, I just felt it was time to move on and give others a chance."
Making it clear he had felt no pressure to retire from ODIs, Azhar said his decision will give team management ample time to finalize their squad for next year's World Cup.
Ali also said his only regret remained the way he could not continue as ODI captain for a long period.
"I just felt at that time they were some people, who didn't support me as ODI captain. Who thought I was not good for this format. It is never easy to captain the Pakistan side but they are also some good memories for me as captain."
A PCB official said that Ali took the decision knowing that he was not in the scheme of things.
"He has got a clear message that he is not in the team management's plans for next year's World Cup in England. He has decided it is better if he just focused on playing Test matches," an official close to Azhar said.
Ali has been one of Pakistan's most prolific run-scorers in Test cricket as he scored a triple century and a double hundred in Tests in the UAE and Australia in 2016 and 2017 respectively
First Published: November 1, 2018, 6:12 PM IST