The 31-year-old - a three-time NBA champion - will be paid $31m in the first year of the contract, a figure that will rise to over $33m in 2017-18, officially making him the highest-paid player in NBA history.
Since rejoining the Cavs from the Miami Heat in 2014, James has been working to one-year contracts but opted for a longer deal after winning a maiden title with the team last season.
"I just want to let y'all know I'm re-signing back with the Cleveland Cavaliers, my hometown team," James said in a video on the Sports Interrupted website.
"I can't be more excited than this opportunity once again, man, to defend our crown, defend our title. We all know last year as a magical, inspiring - all the words you can come up with - it was an unbelievable season.
"I just can't wait to get the group back together - the team, the franchise, more importantly, get everybody together, the fans. Without you guys, without your passion and commitment, we wouldn't have been able to do what we did this past season. I'm ecstatic."
James is also a four-time NBA MVP winner and a two-time Olympic gold medallist.