The 37-year-old will continue to represent Pakistan in the T20Is but admitted he was sad on calling time on his ODI career.
"I am retiring from one-day cricket," said Malik, who was dropped after scoring two ducks in three matches.
"I'm sad as I'm leaving the format I loved the most but this will allow me to spend more time with my family and concentrate on the T20 World Cup next year," added Malik.
Malik's confirmation came after Pakistan’s win which was not enough for them to oust New Zealand in the points table and qualify for the semi-finals.
Pakistan were edged by New Zealand on net run-rate despite both sides finishing on 11 points from nine matches.
Malik appeared in 287 one-day internationals and scored 7,534 runs at an average of 34.55.
Malik, who made his ODI debut in 1999 against West Indies, finished with 158 wickets and also captained Pakistan across 41 ODIs.
His last appearance was against India in Manchester with Pakistan being ousted comprehensively by 89 runs on D/L method.
Malik said he was disappointed to finish on a low note but admitted he was happy for Haris Sohail who played crucial knocks against South Africa and New Zealand.
Today I retire from One Day International cricket. Huge Thank you to all the players I have played with, coaches I have trained under, family, friends, media, and sponsors. Most importantly my fans, I love you all#PakistanZindabad ???? pic.twitter.com/zlYvhNk8n0— Shoaib Malik ???? (@realshoaibmalik) July 5, 2019
"Yes, I wanted to help my team win the World Cup as a senior but at times things don't go the way you think and that's part and parcel of cricket," he said.
"You don't judge a player on two or three matches, but I am still happy that the player who replaced me performed well," Malik said of Haris Sohail.
"I never thought that I will play 20 years for Pakistan but when you play with hard work and honesty you achieve the best and that happened with me.
"I am satisfied with my ODI career and winning the Champions Trophy has been the highlight of my ODI career," he added of Pakistan's triumph in England two years back.