Malik, who made his ODI debut way back in 1999, scored 7,534 runs for India in 287 matches with nine hundreds. With his off-spin, he claimed 158 wickets, apart from leading Pakistan in 41 ODIs.
Disappointed to go out on a low, Malik said it things don't always happen the way you want them to. "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 about Haris Sohail, who replaced him and hit fifties against South Africa and New Zealand.
Speaking about his journey, Malik added, "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. The all-rounder will continue to feature in the T20 side.
Pakistan won the final group match against Bangladesh by an impressive margin of 94 runs will upcoming talent Shaheen Afridi claiming six wickets.
Shoaib Malik's full statement
'As I mentioned in my previous interviews, whenever I gave interviews, that I'm going to retire from World Cup. Today was our last game, and I'm retiring from ODI cricket. I had planned this for a few years ago to retire on the last Pakistan World Cup match. I'm sad that I'll be leaving format of cricket that I once loved but happy that I'll have more time to spend with my family. This will also allow me to focus on Twenty20 cricket. I would like to thank some of the most important people whose support and backing helped me through these 20 years of international cricket. Starting with the players I shared dressing rooms with, all the coaches I have under, my friends and family, the media, my sponsors, the Pakistan cricket board, and Pakistan sports board. But most importantly, my fans. I love you all. Thank you.'
Malik's last appearance was against India at Manchester on June 16.
--By A Cricket Correspondent