Marshall appeared in 54 games for the Lakers last season, averaging 8.0 points, 8.8 assists and 2.9 rebounds per game. He shot 39.9 percent from 3-point range.
He'll be reunited in Milwaukee with Bucks forward John Henson, his teammate at the University of North Carolina.
Phoenix drafted Marshall with the 13th pick in the 2012 draft.
He was traded to Washington with Marcin Gortat and two other players for Emeka Okafor and a draft pick. The Wizards waived him, and he played seven games in the NBA D-League before the Lakers called him up.