After several high-profile incidents that raised concerns about the hazards posed by lithium ion batteries, research has accelerated in the development of safer electrodes and electrolytes. One anode material, titanium dioxide (TiO2), offers a distinct safety advantage in comparison to commercialized graphite anodes, since TiO2 has a higher potential for lithium intercalation. In this article, we present two routes for the facile, robust synthesis of nanostructured TiO2/carbon composites for use as lithium ion battery anodes. These materials are made using a combination of colloidal crystal templating and surfactant templating, leading to the first report of a three-dimensionally ordered macroporous TiO2/C composite with mesoporous walls. Control over the size and location of the TiO2 crystallites in the composite (an often difficult task) has been achieved by changing the chelating agent in the precursor. Adjustment of the pyrolysis temperature has also allowed us to strike a balance between the size of the TiO2 crystallites and the degree of carbonization. Using these pathways to optimize electrochemical performance, the primarily macroporous TiO2/C composites can attain a capacity of 171 mAh/g at a rate of 1 C. Additionally, the carbon in these composites can function as a secondary template for high-surface-area, macroporous TiO2 with disordered mesoporous voids. Combining the advantages of a nanocrystalline framework and significant open porosity, the macroporous TiO2 delivers a stable capacity (>170 mAh/g at a rate of C/2) over 100 cycles.