Group D of the 2012 Africa Cup of Nations ran from 24 January until 1 February. It consisted of Botswana, Ghana, Guinea and Mali. The matches were held in Gabon. Ghana and Mali progressed to the quarterfinals.
<onlyinclude></onlyinclude>
All times are West Africa Time ().
<onlyinclude></onlyinclude>
Assistant referees: <br />Djibril Camara (Senegal) <br />Redouane Achik (Morocco) <br />Fourth official: <br />Bouchaïb El Ahrach (Morocco)
<onlyinclude></onlyinclude>
Assistant referees: <br />Bechir Hassani (Tunisia) <br />Felicien Kabanda (Rwanda) <br />Fourth official: <br />Eric Otogo-Castane (Gabon)
<onlyinclude></onlyinclude>
Assistant referees: <br />Bechir Hassani (Tunisia) <br />Theophile Vinga (Gabon) <br />Fourth official: <br />Eddy Maillet (Seychelles)
<onlyinclude></onlyinclude>
Assistant referees: <br />Abdelhak Etchiali (Algeria) <br />Yanoussa Moussa (Cameroon) <br />Fourth official: <br />Hamada Nampiandraza (Madagascar)
<onlyinclude></onlyinclude>
Assistant referees: <br />Moffat Champiti (Malawi) <br />Balkrishna Bootun (Mauritius) <br />Fourth official: <br />Djamel Haimoudi (Algeria)
<onlyinclude></onlyinclude>
Assistant referees: <br />Songuifolo Yeo (Ivory Coast) <br />Zakhele Siwela (South Africa) <br />Fourth official: <br />Bakary Gassama (Gambia)