Jalen Brunson's layup cut the margin to four with 41.3 seconds remaining. The Knicks got another possession after Embiid missed, but Brunson's three would not fall. James collected the rebound and made both free throws with 7.7 seconds left to complete the scoring.
Brunson led New York with 21 points but shot 6-for-19. Towns had 19 points and 12 rebounds, and Andre Drummond supplied 12 points and 14 rebounds against his former team. The Knicks finished at 37.2 percent from the field. Mikal Bridges scored four points on 2-for-8 shooting, while OG Anunoby went 3-for-12 for 10 points.
Philadelphia had shooting problems of its own, making 37 of 89 attempts and 11 of 40 threes. Its passing and defense helped compensate: the Sixers had 28 assists against 10 turnovers, and their 10 blocks included three apiece from Maxey and Embiid. Simons scored 13 points with three threes, while Kentavious Caldwell-Pope added 10 and made two fourth-quarter triples.
The Sixers host Cleveland on Thursday. New York visits Boston on Friday, looking for its first win after an opening night that began with a championship celebration.