The England and Wales Cricket Board confirmed the switch on Saturday morning, after news of the change at the top first emerged on Friday evening.
Cook, who will be 30 on Christmas Day, has paid the price for his and his team’s poor one-day international form over the past year. He will not be going to the World Cup, the ECB said.
The opener has made just one ODI half-century in his last 22 attempts, and has led his country to five successive series defeats.
England are set to announce a 15-man squad, without Cook, at 11am on Saturday, initially for next month’s tri-series against hosts Australia and India and then the World Cup which begins on February 14.
The ECB statement read: “ECB today announced that Eoin Morgan has replaced Alastair Cook as England one-day captain with immediate effect.
“England selectors met yesterday to pick a 15-man one-day squad for the tour to Australia and the ICC Cricket World Cup. Selectors recommended to managing director England cricket Paul Downton a change in captaincy which has now been approved by the ECB chairman.
“Cook will continue as England Test captain.”
Irishman Morgan, 28, has also been in a trough of form with the bat, with just one half-century in his last 19 innings.
But England have decided nonetheless he is the new captain who represents their best hope of winning the World Cup for the first time.
National selector James Whitaker said: “We spent a considerable time yesterday discussing the make-up of a squad that gives England the best possible chance of success at the World Cup, which begins in less than two months.
“Having reviewed the recent series against Sri Lanka we came to the conclusion that there was no place for Alastair Cook amongst our strongest 15 one-day players and therefore recommended Eoin Morgan be appointed one-day captain.”
Downton added: “I have complete confidence in the decision made by the selectors – and having spent time with Alastair yesterday, he accepts that it has been made in the best interests of the one-day side.
“Eoin has held a senior role in our limited-overs teams for some time and has impressed on the occasions he has led the side.
“I would like to congratulate him on the appointment and wish him, Peter Moores and the rest of the squad all the very best over the next three months.
“Alastair remains an integral part of England cricket and continues to have a vital role in developing our emerging Test side.
“I would like to thank him for his leadership of the one-day side since 2011, a period which saw the team reach number one in the world, Alastair lead the team to more wins than any previous England captain and also make the final of the ICC Champions Trophy.
“Alastair will now focus on an exciting and challenging year of Test cricket beginning with a series against West Indies followed by an Ashes summer culminating in a series against South Africa next winter.”
Cook led England in six of their seven matches in Sri Lanka, where they lost 5-2 and he made just 119 runs at 19.83.
Morgan made 90 at 12.85. He was also in charge in the other fixture, a defeat for which Cook was banned because of an over-rate offence.
Morgan said: “It is a huge honour to captain England, and I am delighted to be leading the one-day side.
“I firmly believe that with the players currently involved in the one-day set-up we have the makings of a very good one-day side, a young side that can surprise people at the World Cup.
“We all recognise we still have a lot of work to do on our one-day game, but the potential of this group of players is huge and it is now up to us as players to turn that potential into consistent performances on the international stage starting next month against Australia and India.”
Cook said: “I am gutted to be left out of the World Cup squad, and it is likely to take me a while to get over the disappointment.
“That said I wish Peter, Eoin and the lads all the best for the World Cup.
“I would also like to thank all the players and fans who have supported me during my time as one-day captain.”