The 40-year-old batsman set a record last year for the most Test wins by a Pakistan skipper.
"Test cricket remains the ultimate test for me and we have tough series coming against England and India," he said.
Pakistan all-rounder Shahid Afridi will quit ODIs after the World Cup to concentrate on T20 cricket.
Misbah, who made his ODI debut in 2002, has scored 4,669 runs at an average of 42.83 in 153 ODIs, and captained Pakistan in 78 games.
He has played 29 Twenty20 internationals, the most recent of which was 2012.
"I took the decision to retire after much thought and feel this is the best time to go from ODIs," Misbah said. "The World Cup is my last ODI venture."
Pakistan Cricket Board chairman Shaharyar Khan said: "He has been a big source of inspiration for the Pakistan team since the spot-fixing scandal and it is his personal decision to retire from ODIs after the World Cup."
The World Cup in Australia and New Zealand starts on 14 February, with Pakistan's opening Pool B game against India in Adelaide the following day.
Pakistan host England in a three-Test series in late 2015, followed by two Tests against India.
Pakistan's Test victory over New Zealand in Abu Dhabi in November was Misbah's 15th as skipper, putting him ahead of Javed Miandad and Imran Khan.
Pakistan captain Misbah-ul-Haq will retire from limited-overs internationals after the World Cup to focus on Test cricket.