The land that is now Danvers was once controlled by the Naumkeag branch of the Massachusett tribe. Around 1630, settlers converted an existing Naumkeag trail into the Old Ipswich Road, creating a connection to the main cities of Salem and Boston. Danvers was permanently settled in 1636 as Salem Village, and eventually petitioned the Crown for a charter as a town. According to legend, the King, rather than signing the charter, returned it with the message "The King Unwilling." On June 9, 1757, however, the town was incorporated anyway, and the King's rebuff was defiantly given a place on the town's seal.
- From the Battle of Lexington onward, Danvers has been represented in the Armed Forces. Noteworthy Revolutionary figures who stayed in Danvers include Royal Governor General Thomas Gage and Benedict Arnold.
- In 1847, the railroad came to Danvers. A street railway was also installed in 1884, originally consisting of horse-drawn trolleys that were later converted to electricity.
- Town Hall was built in 1855 and, though it has undergone modifications and renovations several times, still stands today. In the same year, the southern portion of Danvers broke away to become the town of South Danvers, later renamed Peabody.
- Originally an agricultural town, Danvers farmers developed two breeds of vegetables: the Danvers Onion and the Half-Long Carrot. There was also a booming shoe industry in the late 19th and early 20th centuries, with successful manufacturing companies like Ideal Baby Shoe.
- In 2002, Danvers celebrated its quartermillennial anniversary with special events throughout the year