The teams were chosen by a panel chaired by former India legspinner Anil Kumble after reviewing player performance over 12 months to August 2013. Former Pakistan captain Waqar Younis, former England captain Alec Stewart, former South Africa batsman Graeme Pollock and former New Zealand women's player Catherine Campbell were the other members of the panel.
"The selectors did utilise a vast amount of statistics from the period under observation, but we also took into account other factors like the opposition, pitch conditions, match situation and the like,'' Kumble said.
"But when you have only 12 places to fill from a big group of world-class players, there will always be a few who will miss out.''
Dhoni, who led India to victory in this year's Champions Trophy in England, was named the winner of the people's choice award. He was also nominated for cricketer of the year and one-day cricketer of the year, to be announced on December 14.
Also up for cricketer of the year were Cook, South Africa batsman Hashim Amla, England seam bowler James Anderson, Australia captain Michael Clarke and Sri Lanka's Kumar Sangakkara, last year's world and test cricketer of the year.
Amla, Anderson and Clarke are also on the shortlist for test cricketer of the year.
ICC test team:
Alastair Cook (England, captain), Cheteshwar Pujara (India), Hashim Amla (South Africa), Michael Clarke (Australia), Michael Hussey (Australia), AB de Villiers (South Africa), Mahendra Singh Dhoni (India, wicketkeeper), Graeme Swann (England), Dale Steyn (South Africa), James Anderson (England), Vernon Philander (South Africa); 12th Man: Ravichandran Ashwin (India).
ICC ODI team:
Tillakaratne Dilshan (Sri Lanka), Shikhar Dhawan (India), Hashim Amla (South Africa), Kumar Sangakkara (Sri Lanka), AB de Villiers (South Africa), Mahendra Singh Dhoni (India, captain, wicketkeeper), Ravindra Jadeja (India), Saeed Ajmal (Pakistan), Mitchell Starc (Australia), James Anderson (England), Lasith Malinga (Sri Lanka); 12th Man: Mitchell McClenaghan (New Zealand).