Lincoln is a town in Middlesex County, Massachusetts, United States. The population was 8,056 at the 2000 census, including residents of Hanscom Air Force Base that live within town limits. Without the base, which is largely self-contained, Lincoln is home to 5,152 people, according to the 2000 census.