Mesoporous silica nanofibers with longitudinal pore channels are synthesized in high yields using cetyltrimethylammonium bromide as the structure-directing agent in hydrobromic acid solutions. These nanofibers are used as templates to prepare gold nanoparticles along the fiber axis. For the gold-precursor-loaded nanofibers that are not completely dried, nearly spherical gold nanoparticles are produced by hydrogen reduction. As the reduction temperature is lowered, the size of the gold nanoparticles decreases and the number density greatly increases, resulting in surface plasmon coupling between neighboring gold nanoparticles. For the gold-precursor-loaded nanofibers that undergo an additional drying process, ellipsoidal gold nanoparticles are obtained, with their major axes oriented along the direction of the pore channels. The major axes of ellipsoidal gold nanoparticles can be controlled to be oriented either parallel or perpendicular to the fiber axis by use of nanofibers with either longitudinal or circular pore channels, respectively. These gold-nanoparticle-embedded nanofibers can be expected to find interesting applications in the area of photonics and optoelectronics.