Pepperell was first settled in 1720 as a part of Groton, and was officially incorporated as its own town in 1775. The founders named it after Sir William Pepperell, a Massachusetts colonial soldier who led the Siege of Louisbourg during King George's War. The town was noted for its good soil and orchards.
Since its formation, the town was active in the American independence movement. Being located northwest of Concord, Pepperell never saw British attack during the American Revolutionary War, though several Pepperell men fought at the Old North Bridge during the Battle of Concord, and a British spy was captured by women on guard at the Pepperell covered bridge. Town resident William Prescott served as the commander at the Battle of Bunker Hill in what is now the Charlestown neighborhood of Boston.
In 1848, the Worcester & Nashua Railroad built a line and train station in Pepperell along the Nashua River. In 1886 the line became part of the Boston & Maine Railroad, and continued to operate trains to Worcester and Nashua, as well as connections to Portland, Maine and beyond. In the midst of the Great Depression, the Pepperell stop was taken out of service in 1934, and the station was subsequently demolished. Freight trains continued to pass through Pepperell until 1981, and the tracks themselves were pulled up in 1984. In 2001, what had been the train path was paved over to become part of the Nashua River Rail Trail.
The town library, the Lawrence Library, was designed by architects Ernest Flagg and Walter B. Chambers, and built in 1901. On June 29, 2009 the people of Pepperell voted yes on a Proposition 2½ override, effectively saving operations of the Lawrence Library, Senior Center, and Community Center. The override helped fill a $1.3 million budget shortfall for fiscal year 2010.
One of only three covered bridges on public Massachusetts roads that is open to vehicular traffic (and the only one east of the Connecticut River) is located on Groton Street in Pepperell. The current bridge officially opened on July 30, 2010, replacing the aging Chester H. Waterous Bridge which was closed to vehicles on April 7, 2008 and demolished beginning July 30, 2008. It took two years to construct the new covered bridge.