The salary in the first year of the deal will be $31 million, making James the highest-paid player in the NBA for the first time in his career. The salary for the 2017-18 season will top $33 million, making him the highest-paid player in a single season in league history, topping the $33 million Michael Jordan earned with the Chicago Bulls in the 1997-98 season.
A source told ESPN that James has a player option for the third year.
James posted a photo on Instagram on Friday, with him apparently signing the deal.
Over the past two years, James had accepted one-year contracts from the Cavs with player options. After considering his choices, James opted for a longer deal with the Cavs this summer.
James announced he would sign the new deal on Bleacher Report's video platform Uninterrupted on Thursday.
"I just want to let y'all know I'm re-signing back with the Cleveland Cavaliers, my hometown team," James said. "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. I can't wait to see my guys. I can't wait to get back out there in the wine and gold and just get the band back together. Lastly, let's get J.R. [Smith] done. It's that time."
Smith, a Cavs shooting guard last season, is a free agent.
Information from ESPN's Chris Broussard was used in this report.