The bill was passed on Sunday with a 37-14 vote, according to the Mississippi StateWatch legislative information service. Earlier in the day, it was passed by the Mississippi House of Representatives with a 91-23 vote.
The bill calls for the removal of the Confederate battle emblem from the state flag and for the establishment of a commission to come up with a new flag design that will be voted upon in a state referendum.
Mississippi Governor Tate Reeves said via Twitter on Saturday that the argument over the 1894 state flag "has become as divisive as the flag itself." Reeves said he would sign the new flag bill.
Mississippi has remained the only US state featuring the Confederate emblem on its flag.
Monuments and statues of American historical figures somehow connected to slavery have become a major target for protesters during the ongoing demonstrations that started after the death of African-American George Floyd in police custody in Minneapolis on 25 May. Several state governors have approved the removal of Confederate monuments amid the protests.