Lincoln is a town in the historic area of Middlesex County, Massachusetts, United States. The population was 6,362 at the 2010 census, including residents of Hanscom Air Force Base that live within town limits.