Strom Thurmond was a member of the Democratic Party for the early part of his political career. He was first elected to public office as a Democrat in 1929, serving as the superintendent of education for Edgefield County, South Carolina. He continued to serve in various roles as a Democrat, including as a state senator, circuit judge, and governor of South Carolina.
In the 1948 presidential election, Thurmond broke from the Democratic Party to run as the candidate for the States' Rights Democratic Party (often called the "Dixiecrats"), a segregationist offshoot of the Democratic Party. After his unsuccessful presidential bid, he returned to the Democratic Party and was elected to the U.S. Senate in 1954.
Thurmond officially switched to the Republican Party in 1964, amidst the shifting political landscape of the Civil Rights era. So, he was a Democrat for about 35 years in his political career, depending on whether you count the Dixiecrat period as part of his time in the Democratic Party.