The resolution passed the House 96-0 and cleared the 40-member Senate on a unanimous voice vote. It does not require Governor Timothy M. Kaine's approval.
The measure also expressed regret for "the exploitation of Native Americans."
The resolution was introduced as Virginia begins its celebration of the 400th anniversary of Jamestown, where the first Africans arrived in 1619.
Richmond also became another point of arrival for Africans and a slave-trade hub.
The resolution says government-sanctioned slavery "ranks as the most horrendous of all depredations of human rights and violations of our founding ideals in our nation's history, and the abolition of slavery was followed by systematic discrimination, enforced segregation, and other insidious institutions and practices toward Americans of African descent that were rooted in racism, racial bias, and racial misunderstanding."
In Virginia, black voter turnout was suppressed with a poll tax and literacy tests before those practices were struck down by federal courts, and state leaders responded to federally ordered school desegregation with a "Massive Resistance" movement in the 1950s and early '60s. Some communities created exclusive whites-only schools.
Virginia was the first state to elect L. Douglas Wilder, a black governor, in 1989, and the Legislature took a step toward atoning for Massive Resistance in 2004 by creating a scholarship fund for blacks whose schools were shut down between 1954 and 1964.