Concentrations of 10Be in ice cores and marine sediments exhibit 2 peaks with significant enhancements at 35,000 and 60,000 BP. This radioisotope is produced in the upper atmosphere by spallation of cosmic-ray protons and secondary neutrons on atmospheric nitrogen and oxygen. Previously suggested explanations for the increases include geomagnetic field reversals, a decrease in solar activity, and a supernova explosion. We propose an alternative explanation which involves a change in the galactic environment of the solar system. The structure of the heliosphere is investigated for a period when the Sun enters a cold, dense, unmagnetized interstellar cloud. Under these conditions, the heliosphere contracts to 25% its present size, significantly affecting galactic cosmic ray modulation and increasing anomalous cosmic ray fluxes. A tenfold increase in anomalous cosmic ray flux and a twofold increase in galactic cosmic ray intensity at Earth are possible in this high-density case if heliosheath modulation is reduced. We show that this increase in galactic cosmic ray intensity could be responsible for the peaks in 10Be records.