The Taiwanese American, who admitted earlier this week his performances for the Rockets had been below par, scored 22 points and claimed eight assists against the New York Knicks to hand them their first home loss of the season.
James Harden scored a team-high 28 points and grabbed 10 boards for the Rockets to end their run of seven away defeats, as the sell-out crowd in New York gave Lin a loud ovation before the match.
"It was a lot of fun playing out there," said Lin, who heard some boos once the game started.
"I think our team took a step in the right direction. For me, it was great to be back and it was a lot of fun to play on that court again."
Chris Copeland notched a career-best 29 points for the Knicks, who had a 12-game unbeaten streak at home dating back to last season.
Copeland, who was starting in place of injured Carmelo Anthony, scored all of his points in the second half.
"It's one bright spot," said Copeland. "But we lost and we have to go back to the drawing board and figure out exactly what we didn't do right."
Serge Ibaka produced a season-best 25 points and 17 rebounds to maintain Oklahoma City Thunder's momentum as they ran out 107-93 winners over San Antonio Spurs.
Ibaka dominated the post against Tim Duncan to help the NBA-leading Thunder cruise to their 11th straight win.
"Serge was terrific tonight," Oklahoma City's Kevin Durant said afterwards.
"They do a great job of taking the main scorers out of the game. So that's when you have to step up."
Russell Westbrook added 22 and nine assists while Durant added 19 for Oklahoma City in a rematch of last season's Western Conference Finals when the Thunder eliminated the Spurs.
Stephen Jackson, who had previously been fined $25,000 (Dh92,000) for a hostile Tweet aimed at Ibaka, made his return from injury and admitted: "He hurt us bad. He was hitting everything.
"That's the same way we lost last year in the playoffs, by him hitting those same shots. I take my hat off (to him)."
Elsewhere Jamal Crawford and Blake Griffin had 15 points apiece to lead five Los Angeles Clippers players in double figures as they extended their winning streak to 10 games with an 88-76 victory over the Detroit Pistons.
Shannon Brown scored 22 points to help the Phoenix Suns rally from 19 points down to beat the Sacramento Kings 101-90.
Glen David poured in 28 points in the Orlando Magic's 102-93 win over the Minnesota Timberwolves, while the Memphis Grizzlies overcame the Chicago Bulls 80-71.