Gordon averaged career highs of 17.6 points, 7.9 rebounds, 2.3 assists and two 3-pointers made per game during the 2017-18 season for Orlando.
The athletic 6-foot-9, 220-pounder told The Undefeated recently that while he had planned to do his due diligence in free agency, his preference was to return to the Magic.
Orlando general manager John Hammond also told The Undefeated last week that the franchise had hoped to sign Gordon long term.
Gordon's deal includes no options or opt-outs, a source said.
Gordon, 22, already is the face of a young Magic franchise.
The Magic selected Gordon with the fourth overall pick in the 2014 NBA draft out of the University of Arizona. The San Jose, California, native has averaged 11.4 points, 5.8 rebounds and 1.7 assists during his NBA career.
The Magic have not had a winning record nor made the playoffs since the lockout-shortened 2011-12 season.
"It's been a heartbreaker. It really shows what you are made of," Gordon said to The Undefeated last week. "But all I am going to do is keep taking the right actions. Keep working hard. Be egoless with my teammates and the organization I'm with. Continue to work and play the right way until we get to the time where we're ready to make steps and waves in the playoffs and win championships.
"The time will come. I have no doubt about that. It's just a matter of being ready when it comes."
Gordon also made his acting debut as a talented but cocky basketball player named "Casper" in the movie "Uncle Drew" that was released nationwide last week.