Two original series of carbon gels doped with different cobalt loadings and well-developed mesoporosity, aerogels and xerogels, have been prepared, exhaustively characterized, and tested as cathodes for the electro-catalytic reduction of CO2 to hydrocarbons at atmospheric pressure. Commercial cobalt and graphite sheets have also been tested as cathodes for comparison. All of the doped carbon gels catalyzed the formation of hydrocarbons, at least from type C1 to C4. The catalytic activity depends mainly on the metal loading, nevertheless, the adsorption of a part of the products in the porous structure of the carbon gel cannot be ruled out. Apparent faradaic efficiencies calculated with these developed materials were better that those obtained with a commercial cobalt sheet as a cathode, especially considering the much lower amount of cobalt contained in the Co-doped carbon gels. The cobalt-carbon phases formed in these types of doped carbon gels improve the selectivity to C3-C4 hydrocarbons formation, obtaining even more C3 hydrocarbons than CH4 in some cases.