Stars form in the densest, coldest, most quiescent regions of molecular clouds. Molecules provide the only probes that can reveal the dynamics, physics, chemistry, and evolution of these regions, but our understanding of the molecular inventory of sources and how this is related to their physical state and evolution is rudimentary and incomplete. The Spectral Legacy Survey (SLS) is one of seven surveys recently approved by the James Clerk Maxwell Telescope (JCMT) Board of Directors. Beginning in 2007, the SLS will produce a spectral imaging survey of the content and distribution of all the molecules detected in the 345 GHz atmospheric window (between 332 and 373 GHz) toward a sample of five sources. Our intended targets are a low-mass core (NGC 1333 IRAS 4), three high-mass cores spanning a range of star-forming environments and evolutionary states (W49, AFGL 2591, and IRAS 20126), and a photodissociation region (the Orion Bar). The SLS will use the unique spectral imaging capabilities of HARP-B/ACSIS (Heterodyne Array Receiver Programme B/Auto- Correlation Spectrometer and Imaging System) to study the molecular inventory and the physical structure of these objects, which span different evolutionary stages and physical environments and to probe their evolution during the star formation process. As its name suggests, the SLS will provide a lasting data legacy from the JCMT that is intended to benefit the entire astronomical community. As such, the entire data set (including calibrated spectral data cubes, maps of molecular emission, line identifications, and calculations of the gas temperature and column density) will be publicly available.