Born in Hummelstown, Pennsylvania on September 8, 1815, Alexander was the eldest of five children of Thomas Ramsey and Elizabeth Kelker (also Kölliker or Köllker). His father was a blacksmith who committed suicide at age 42 when he went bankrupt in 1826, after signing for a note of a friend. Alexander lived with his uncle in Harrisburg, after his family split up to live with relatives. His brother was Justus Cornelius Ramsey, who served in the Minnesota Territorial Legislature.
Ramsey first studied carpentry at Lafayette College but left during his third year. He read law with Hamilton Alricks, and attended Reed's law School in Carlisle (now Pennsylvania State University - Dickinson Law) in 1839. He was admitted to the Pennsylvania bar in 1839.
In 1844 Ramsey married Anna Earl Jenks, daughter of Michael Hutchinson Jenks, and they had three children. Only one daughter, Marion, survived past childhood.
Alexander Ramsey was elected from Pennsylvania as a Whig to the U.S. House of Representatives and served in the 28th and 29th congresses from March 4, 1843 to March 3, 1847. He served as the first Territorial Governor of Minnesota from June 1, 1849 to May 15, 1853 as a member of the Whig Party.
Ramsey was of Scottish and German ancestry. In 1855, he became the mayor of St. Paul, Minnesota. Ramsey was elected the second Governor of Minnesota after statehood and served from January 2, 1860 to July 10, 1863. Ramsey is credited with being the first Union governor to commit troops during the American Civil War. He happened to be in Washington, D.C. when fighting broke out. When he heard about the firing on Ft. Sumter he went straight to the White House and offered Minnesota's services to Abraham Lincoln.
He resigned the governorship to become a U.S. Senator, having been elected to that post in 1863 as a Republican. He was re-elected in 1869 and held the office until March 3, 1875, serving in the 38th, 39th, 40th, 41st, 42nd, and 43rd congresses.
Ramsey is also noted for his statements calling for the killing or removal of specific Native Americans, chiefly the Sioux (Dakota) people that lived in the state of Minnesota. These statements came in response to attacks by the Sioux on American settlements, resulting in the death of not less than 800 men, women and children, as mentioned in Abraham Lincoln's Second Annual Message on December 1, 1862. Ramsey declared on September 9, 1862: "The Sioux Indians of Minnesota must be exterminated or driven forever beyond the borders of the state." He went as far as offering money for scalps of Dakotas.
Ramsey served as Secretary of War from 1879 to 1881, under President Rutherford B. Hayes.
The Minnesota Historical Society preserves his home, the Alexander Ramsey House as a museum. It was added to the National Register of Historic Places in 1969. Alexander Ramsey Park, located in Redwood Falls, Minnesota, is the largest municipal park in Minnesota. Ramsey County, Minnesota, Ramsey County, North Dakota, the city of Ramsey, Minnesota, the city of Ramsey, Illinois, Ramsey Park in Stillwater, Minnesota, Ramsey Junior High School in Saint Paul, Minnesota, Alexander Ramsey Elementary School in Montevideo, Minnesota and Ramsey Middle School (formerly Ramsey International Fine Arts Center and formerly Alexander Ramsey Junior High School) in Minneapolis, Minnesota, are also named for him. In the 2016-17 school year, a student-initiated effort to rename Ramsey Middle School resulted in renaming the school after Alan Page, the first African-American Minnesota Supreme Court justice.