A method for growing carbon cages using gold nanoparticles as templates is reported. Gold nanoparticles were deposited on carbon nanotubes (CNTs). The nanocages were grown on the gold particles by electrical Joule heating of the CNT. The gold was subsequently evaporated, leaving the cages intact. A special in situ TEM-holder equipped with a small scanning tunneling microscope was used as an electrical probe to drive current through the CNT, while the TEM was used for imaging of the entire growth process. The method might provide a general way for making carbon structures limited only by the shapes allowed by the fabrication methods of the gold nanostructures.