First a part of Dunstable, Massachusetts, then settled as West Hollis, the town was granted in 1769 as Raby. Governor John Wentworth named it after his cousin, 4th Earl of Strafford and Baron of Raby Castle.
The town was renamed in 1798 at the suggestion of a leading citizen originally from Brookline, Massachusetts. By 1859, when the population was 718, there were eight sawmills, one gristmill, and a sash and blind shop. The town was noted for producing lumber, charcoal and casks.
The town received national attention in 1997, when people participating in the traditional ringing of the Congregational Church bell at midnight on the Fourth of July were arrested. Several prominent members of the community were among those arrested, including Road Agent Clarence Farwell and his wife. The incident led to an investigation of the Brookline police department after questions of excessive force were raised following the arrests.
Brookline has several buildings on the National Register of Historic Places.
In 1874, Brookline was served by the Worcester and Nashua Railroad, and service by the Lyndeborough and Brookline Railroad was planned.