The 22-year-old came through the Sharks academy and has established himself as the first-choice outside centre this season.
"Sam is maturing into a class player," said director of rugby Steve Diamond.
"He is a dedicated professional who absorbs all the information and guidance that the coaches and senior players throw at him."
James made his first Premiership start in the opening game of the season at Saracens and has gone onto score four tries in 13 appearances.
"I was more than happy to sign a new deal with the club I grew up with," he said. "I am looking forward to the rest of this season as we have plenty to play for."
Sale Sharks centre Sam James has signed a new two-year deal with the Premiership side.