The incident took place with 9:18 remaining in the third quarter, with the Lakers trailing 78-66, as James swung his arm through and struck Pistons centre Stewart in the eye area when battling for a rebound after a free throw.
Stewart, with blood streaming from his eye, had to be held back by multiple staff members as he attempted to confront James on several occasions.
Following an official review, James was assessed a 'flagrant two penalty', resulting in his ejection for just the second time in his 19-year career. His first ejection came in November 2017 against the Miami Heat.
Stewart was also ejected, while Lakers guard Russell Westbrook was handed a technical foul for his involvement in the scrap following the incident.
James finished the night with 10 points and five assists as the Lakers went on to win 121-116 in Detroit.