Hamilton, who grew up in Iowa and Colorado, wanted to be a nun and briefly taught parochial school in Los Angeles. After discovering socialism, she became active in the Civil Rights Movement in the South, and joined the Congress of Racial Equality. She participated in the Freedom Rides, and was arrested in Jackson, Mississippi, in 1961, enduring "sweltering jails, invasive and unnecessary vaginal exams, answering police and jail officers with "polite noncompliance". She continued to engage in non-violent protest and helped register voters, all the while being arrested frequently at protests, and rose to the position of "field secretary", the only female field secretary at the time, only the third one in CORE's history, and the first one to be allowed to work in the South. Eventually she became CORE's Southern regional director.
After being arrested in Lebanon, Tennessee, a mayor who visited her addressed her as Mary, without the honorific "Miss" or "Mrs.", which were then frequently denied to African-Americans, but she corrected him: "if you don't know how to speak to a lady...then get out of my cell." Things came to a head when she was one of many civil rights protesters arrested in 1963 in Gadsden, Alabama, and during cross examination at a habeas corpus hearing by the prosecutor in the Etowah County courthouse she refused to answer unless he stopped addressing her as "Mary", demanding she be called "Miss Hamilton". Supported by her lawyer and enduring what she later reported were lewd comments directed at her by Judge Cunningham, she was fined $50 for contempt of court and, when she refused to pay, spent five days in jail. An appeal was filed on grounds that she was denied her constitutional rights since she did not receive the same treatment as white witnesses. It was denied by the Alabama Supreme Court and ended up before the United States Supreme Court, which in April 1964 unanimously overruled the lower court without hearing oral arguments. The case made national headlines and landed Hamilton on the cover of Jet magazine, but left her tired and in ill health.
In 1964 Hamilton left CORE to marry Walter Young, a dentist, and returned to her hometown in Denver, Colorado. That marriage ended in divorce, as did her subsequent marriage to Harold Wesley. She subsequently worked as a union organizer for 1199, the Drug & Hospital Workers, and an educator in New York, earning an MAT from Manhattanville College in 1971 and going on to teach English at Sleepy Hollow High School until she retired in 1990. Mary Hamilton died on November 13, 2002 after a seven-year battle against 4th-stage ovarian cancer.