Williams averaged 5.9 points and 2.6 assists in 53 games with the Nets last season after missing the first 23 games with a broken right foot. He made the NBA's all-rookie second team in 2007 after a three-year career at Connecticut.
"Marcus is a good young ballplayer with outstanding skills," Nets president Rod Thorn said. "This transaction allows us to acquire another future asset, and we wish Marcus the best in his basketball future."
Monta Ellis is expected to become Golden State's starting point guard in the upcoming season, but the only other point guard on the Warriors' roster after Davis' departure was unproven youngster C.J. Watson.
"We felt that we needed to acquire another point guard and a player who is capable of running our offense and expanding our depth," said Chris Mullin, the Warriors' top basketball executive. "We feel that Marcus can contribute to our cause next season."