The region now known as Alabama has been inhabited for some 9,000–10,000 years. The earliest evidence of human habitation, charcoal from an ancient campfire at Russell Cave in northeastern Alabama, is about 9,000 years old. These early peoples, probably descended from humans who crossed from Asia to North America via the Bering Strait, moved from caves and open campsites to permanent villages about AD 1000. Some of their descendants, popularly called Mound Builders, erected huge earthen temple mounds and simple huts along Alabama's rivers, beginning around 1100. Moundville (near Tuscaloosa), one of the most important Mound Builder sites in the southeastern US, includes 20 "platform mounds" for Indian buildings, dating from 1200 to 1500. When the first Europeans arrived, Alabama was inhabited by Indians, half of them either Creek or members of smaller groups living within the Creek confederacy. The Creeks resided in central and eastern Alabama; Cherokee Indians inhabited northeastern Alabama, the Chickasaws lived in the northwest, and the Choctaws settled in the southwest.

During the 16th century, five Spanish expeditions entered Mobile Bay or explored the region now called Alabama. The most extensive was that of Hernando de Soto, whose army marched from the Tennessee Valley to the Mobile Delta in 1540. In 1702, two French naval officers—Pierre Le Moyne, Sieur d'Iberville; and Jean Baptiste Le Moyne, Sieur de Bienville—established Ft. Louis de la Mobile, the first permanent European settlement in present-day Alabama. Mobile remained in French hands until 1763, when it was turned over to the British under the terms of the Treaty of Paris. Because a British garrison held Mobile during the American Revolution, that city was captured in 1780 by the forces of Spain, an ally of the rebellious American colonists. In 1803, the United States claimed the city as part of the Louisiana Purchase, but in vain. Spanish control of Mobile lasted until the city was again seized during the War of 1812, this time by American troops in 1813. West Florida, including Mobile, was the only territory added to the US as a result of that war.

At the start of the 19th century, Indians still held most of present-day Alabama. War broke out in 1813 between American settlers and a Creek faction known as the Red Sticks, who were determined to resist white encroachment. After General Andrew Jackson and his Tennessee militia crushed the Red Sticks in 1814 at the Battle of Horseshoe Bend in central Alabama, he forced the Creek to sign a treaty ceding some 40,000 sq mi (103,600 sq km) of land to the US, thereby opening about three-fourths of the present state to white settlement. By 1839, nearly all Alabama Indians had been removed to Indian Territory.

From 1814 onward, pioneers, caught up by what was called "Alabama fever," poured out of the Carolinas, Virginia, Georgia, Tennessee, and Kentucky into what Andrew Jackson called "the best unsettled country in America." Wealthy migrants came in covered wagons, bringing their slaves, cattle, and hogs. But the great majority of pioneers were ambitious farmers who moved to the newly opened area in hopes of acquiring fertile land on which to grow cotton. Cotton's profitability had increased enormously with the invention of the cotton gin. In 1817, Alabama became a territory; on 2 August 1819, a state constitution was adopted; and on the following 14 December, Alabama was admitted to statehood. Alabama, then as now, was sparsely populated. In 1819, its residents comprised 1.3% of the US population. That percentage had grown to only 2% in 1980.

During the antebellum era, 95% of white Alabamians lived and worked in rural areas, primarily as farmers. Although "Cotton was king" in 19th-century Alabama, farmers also grew corn, sorghum, oats, and vegetables, as well as razorback hogs and cattle. By 1860, 80% of Alabama farmers owned the land they tilled. Only about 33% of all white Alabamians were slaveowners. Whereas in 1820 there were 85,451 whites and 41,879 slaves, by 1860 the number of slaves had increased to 435,080, constituting 45% of the state population. Large planters (owners of 50 slaves or more) made up less than 1% of Alabama's white population in 1860. However, they owned 28% of the state's total wealth and occupied 25% of the seats in the legislature. Although the preponderance of the wealth and the population in Alabama was located in the north, the success of Black Belt plantation owners at forging coalitions with industrialists enabled planters to dominate state politics both before and after the Civil War. The planters led the secessionist movement, and most other farmers, fearing the consequences of an end to slavery, eventually followed suit. However, 2,500 white Alabamians served in the Union Army, and an estimated 8,000–10,000 others acted as Union scouts, deserted Confederate units, or hid from conscription agents.

Alabama seceded from the Union in January 1861 and shortly thereafter joined the Confederate States of America. The Confederacy was organized in Alabama's senate chamber in Montgomery, and Jefferson Davis was inaugurated president on the steps of the capitol. Montgomery served as capital of the Confederacy until May, when the seat of government was moved to Richmond, VA.

Remote from major theaters of war, Alabama experienced only occasional Union raids during the first three years of the conflict. In the summer of 1864, however, Confederate and Union ships fought a major naval engagement in Mobile Bay, which ended in surrender by the outnumbered southern forces. During the Confederacy's dying days in the spring of 1865, federal troops swept through Tuscaloosa, Selma, and Montgomery. Their major goal, Selma, one of the Confederacy's main industrial centers, was left almost as heavily devastated as Richmond or Atlanta. Estimates of the number of Alabamians killed in the Civil War range from 25,000 upward.

During Reconstruction, Alabama was under military rule until it was readmitted to the Union in 1868. For the next six years, Republicans held most top political positions in the state. With the help of the Ku Klux Klan, Democrats regained political control of the state in November 1874.

Cotton remained the foundation of the Alabama economy in the late 19th and early 20th centuries. However, with the abolition of slavery it was now raised by sharecroppers—white and black landless farmers who paid for the land they rented from planters with the cotton they harvested. Alabama also attempted to create a "New South" in which agriculture would be balanced by industry. In the 1880s and 1890s, at least 20 Alabama towns were touted as ironworking centers. Birmingham, founded in 1871, became the New South's leading industrial center. Its promoters invested in pig iron furnaces, coal mines, steel plants, and real estate. Small companies merged with bigger ones, which were taken over, in turn, by giant corporations. In 1907, Birmingham's Tennessee Coal, Iron, and Railroad Co. was purchased by the nation's largest steelmaker, US Steel.

Another major Alabama enterprise was cotton milling. By 1900, 9,000 men, women, and children were employed in Alabama mills; most of these white workers were farm folk who had lost their land after the Civil War because of mounting debts and low cotton prices. Wages in mills were so low that entire families had to work hours as long as those they had endured as farmers.

The rise in the rate of farm tenancy produced a corresponding increase in social and political unrest. Discontented farmers and factory workers allied during the 1890s in the Populist Party in an attempt to overthrow the Bourbon Democrats who had dominated Alabama politics for two decades. Although a number of Populists were elected to the Alabama legislature, no Populist candidate succeeded in winning the governorship, primarily because Democrats manipulated the black vote to their own advantage. In 1901, Alabama adopted a new state constitution containing numerous restrictions on voting, supposedly to end vote manipulation and restore honest elections. The tangible result of these new rules was to disenfranchise almost all Alabama black voters and thousands of poor whites. For example, the total of blacks registered in 14 counties fell from 78,311 in 1900 to 1,081 in 1903. As recently as 1941, fewer than 25% of Alabama adults were registered voters. In 1960, no blacks voted in Lowndes or Wilcox counties, 80% and 78% black, respectively.

As one of the poorest states in the country, Alabama benefited disproportionately from the New Deal. Yet, like other southern states, Alabama viewed the expansion of the national government's role with mixed feelings. Alabamians embraced federal aid, even lobbying for military bases, while seeing federal power as a threat to the "Southern way of life" that included racial segregation.

During the 1950s and 1960s, national attention focused on civil rights demonstrations in Alabama, including the Montgomery bus boycott of 1955, the Birmingham and University of Alabama demonstrations of 1963, and the voting rights march from Selma to Montgomery in 1965. The primary antagonists were Dr. Martin Luther King, Jr., head of the Southern Christian Leadership Conference; and Governor George C. Wallace, an opponent of integration. These black protests and the sometimes violent reactions to them, such as the 1963 bombing of a church in Birmingham in which four young black girls—Denise McNair, Cynthia Wesley, Carole Rosamond Robertson, and Addie Mae Collins—were killed, helped influence the US Congress to pass the Civil Rights Act of 1964 and the Voting Rights Act of 1965. Four former Ku Klux Klansmen were suspects of the church bombing: Robert E. Chambliss, Bobby Frank Cherry, Herman Frank Cash, and Thomas E. Blanton, Jr. In 1977, Robert Chambliss was convicted of the murders, and was sentenced to a life term. He died in prison in 1985. Suspect Herman Cash died in 1994, without having been charged of the crime. Blanton and Cherry were indicted on four counts each of first-degree and reckless murder in 2000. Cherry was subsequently ruled mentally incompetent to stand trial, but Blanton was convicted of four counts of first-degree murder in 2001, and sentenced to four life terms. Cherry was later deemed competent to stand trial, and in 2002, he was convicted and sentenced to an automatic life term in prison.

Once the most tightly segregated city in the nation, Birmingham has become thoroughly integrated in public facilities, and in 1979 the city elected its first black mayor, Richard Arrington. The civil rights era brought other momentous changes to Alabama. Hundreds of thousands of black voters are now an important force in state politics. Blacks attend school, colleges, and universities of their choice and enjoy equal access to all public facilities. On the whole, new racial attitudes among most whites have contributed to a vast improvement in the climate of race relations since 1960. Indeed, a significant amount of black support contributed to Wallace's election to a fourth term as governor in 1982. When he died in September 1998 he was given a full state funeral and his family received condolences from black leaders. In 1984 there were 314 black elected officials, including 25 mayors, 19 lawmakers in the Alabama state legislature, and an associate justice of the state supreme court. In 1990, 704 blacks held elective office.

In many respects Alabama has resisted change more successfully than any other state in the deep South. The state's tax system remains the most regressive in the country. In 1982, the state legislature passed a law prohibiting taxation of land owned by timber companies at market value (timber comprises the state's largest industry). Alabama does not use property taxes to fund schools; instead, public education revenue is derived principally from state income tax (52.9% in 2000) and sales tax (33.5% in 2000). In the late 1990s the state worked to increase teachers' salaries and bring other measures in line with national education statistics. Alabama has had one of the highest infant mortality rates in the nation (it ranked 3rd-highest in 1996), owing in part to widespread poverty. Though Alabama's poverty rate steadily declined during the last decades of the 1900s, it remained among the nation's poorer states. In 1969, 25.4% of Alabamians lived below federal poverty levels. By 1989 the figure dropped to 18.3% and in 1998 it decreased to an estimated 15%, the 13th highest rate in the nation.

A strange turn of events in 1986 resulted in the election of the first Republican governor since Reconstruction. The Democratic candidate, State Attorney General Charles Graddick, was stripped of his party's nomination by a federal panel because of crossover Republican voting in the Democratic primary. His replacement, Lieutenant Governor Bill Baxley, lost the election to a little-known pro-business Republican and former Baptist preacher, Guy Hunt. Hunt was reelected in 1990 but was confronted early in his second term with accusations of financial misdeeds, including personal use of official resources and mismanagement of public funds. In 1992 Hunt was indicted on 13 separate felony counts. The following year, he was found guilty of fraud and conspiracy charges and forced to resign the governorship, becoming the fourth governor in the nation's history to be convicted of criminal charges while in office.

In 1995–96 Alabama was one of five southern states in which a string of fires were set at predominantly black churches. Early in 1996, Attorney General Janet Reno announced that the federal government planned to investigate the fires.

In 1999, Alabama received the 2nd-largest surplus in the history of the state; the $57 million budget surplus was credited to tight controls over agency spending. In 2003, the state had a $675 million budget deficit, and Governor Bob Riley proposed a $1.3 billion tax increase raising individual and corporate taxes by $461 million and local and state property taxes by $465 million. Voters were to decide the fate of Riley's proposal in a referendum held in September 2003.