Madison is a city and former coal town in Boone County, West Virginia, United States. The population was 2,911 at the 2020 census. It is the county seat of Boone County.
 Madison was first established as Boone Court House.  The town was renamed circa 1865, presumably for James Madison, the fourth president of the United States. Other theories hold that it was named for lawyer James Madison Laidley or for William Madison Peyton, a pioneer coal operator, who was a leader in the movement which resulted in the formation of Boone County and for whom Peytona on Big Coal River was also named. Madison was incorporated in 1906.
 The first courthouse at Madison, a log structure, was burned by Union troops early in the Civil War. The second courthouse, made of local brick, served until 1913, and a frame building was used by county officials for the next several years. The present Boone County Courthouse, occupied in 1921, is listed on the National Register of Historic Places.
 Madison is the "Gateway to the Coalfields," as it is located on a principal route through the southern coalfields.  It occupied a strategic place during the Mine Wars. Miners twice rallied at the town ballpark in August 1921, to consider whether to continue their march to neighboring Logan and Mingo counties. Thousands of armed marchers passed through the town and surrounding region on their way to and from the fighting at Blair Mountain, which is located up Spruce Fork from Madison.
 In addition to the Boone County Courthouse, the Madison National Bank building is listed on the National Register of Historic Places.
 Madison is located at 38°3′43″N 81°49′6″W﻿ / ﻿38.06194°N 81.81833°W﻿ / 38.06194; -81.81833 (38.061816, -81.818216). The Little Coal River is formed at Madison by the confluence of its Spruce Fork and its Pond Fork.
 According to the United States Census Bureau, the city has a total area of 7.07 square miles (18.31 km2), of which 7.01 square miles (18.16 km2) is land and 0.06 square miles (0.16 km2) is water.
 As of the census of 2010, there were 3,076 people, 1,299 households, and 881 families living in the city. The population density was 438.8 inhabitants per square mile (169.4/km2). There were 1,428 housing units at an average density of 203.7 per square mile (78.6/km2). The racial makeup of the city was 96.3% White, 2.3% African American, 0.4% Asian, 0.7% from other races, and 0.4% from two or more races. Hispanic or Latino of any race were 0.9% of the population.
 There were 1,299 households, of which 29.9% had children under the age of 18 living with them, 51.7% were married couples living together, 11.5% had a female householder with no husband present, 4.6% had a male householder with no wife present, and 32.2% were non-families. 28.2% of all households were made up of individuals, and 12.7% had someone living alone who was 65 years of age or older. The average household size was 2.36 and the average family size was 2.86.
 The median age in the city was 42.1 years. 21.2% of residents were under the age of 18; 7.8% were between the ages of 18 and 24; 24.6% were from 25 to 44; 30.4% were from 45 to 64; and 16% were 65 years of age or older. The gender makeup of the city was 48.2% male and 51.8% female.
 As of the census of 2000, there were 2,677 people, 1,191 households, and 783 families living in the city. The population density was 479.1 people per square mile (184.9/km2). There were 1,319 housing units at an average density of 236.1 per square mile (91.1/km2). The racial makeup of the city was 94.81% White, 4.18% African American, 0.04% Native American, 0.41% Asian, 0.07% from other races, and 0.49% from two or more races. Hispanic or Latino of any race were 0.26% of the population.
 There were 1,191 households, out of which 25.4% had children under the age of 18 living with them, 50.9% were married couples living together, 12.0% had a female householder with no husband present, and 34.2% were non-families. 31.7% of all households were made up of individuals, and 12.8% had someone living alone who was 65 years of age or older. The average household size was 2.24 and the average family size was 2.79.
 In the city, the population was spread out, with 20.7% under the age of 18, 7.2% from 18 to 24, 24.5% from 25 to 44, 30.1% from 45 to 64, and 17.5% who were 65 years of age or older. The median age was 44 years. For every 100 females, there were 84.4 males. For every 100 females age 18 and over, there were 81.5 males.
 The median income for a household in the city was $29,911, and the median income for a family was $37,232. Males had a median income of $31,389 versus $23,160 for females. The per capita income for the city was $18,309. About 18.2% of families and 21.4% of the population were below the poverty line, including 31.8% of those under age 18 and 11.7% of those age 65 or over.