He scored 26 points to take his career tally to 44,157, surpassing Kareem Abdul-Jabbar's 44,149.
However, James missed a last-second free throw that would have won the game for the Lakers in San Francisco.
Klay Thompson scored a season-high 33 points for the Warriors.
With 36,526 points, James remains behind Abdul-Jabbar (38,387) and Karl Malone (36,928) on the regular-season points list.
"In all my career, any time I've been linked with some of the greats, I've always just been in awe," said 37-year-old James, who has scored at least 25 points in his past 22 games.
Widely regarded as one of the best players of all time, James has won four NBA Championships, four NBA MVP awards, four NBA Finals MVP awards and two Olympic gold medals with the United States.