Donachie played 62 times over five seasons for Brisbane before his departure and gives Victory coach Kevin Muscat an option to cover the loss of experienced Frenchman Matthieu Delpierre.
"We're thrilled to welcome James to Melbourne Victory," Muscat said.
"James is one of the most exciting defenders in the competition and he will complement our group.
Donachie will reunite with Besart Berisha and Jason Geria, who he played with at the Roar, while he also links up in defence with Australia U-23 team-mate Thomas Deng.
"I'm excited about the chance to join Victory, and I'm looking forward to getting to work when pre-season begins," Donachie said.
"I want to establish myself as a regular in the team and continue to develop as a player.
"I feel like my best football is ahead of me, and it's exciting to have an opportunity to play at a club like Victory."
Brisbane-born Donachie made his A-League debut for the Roar during the 2011-2012 season and won two championships - in 2012 and 2014 - with Brisbane.