Jeremy Lin will take his talents to China.

The Harvard-educated basketball player, who electrified America with a run of "Linsanity" for a month and a half in early 2012, signed a deal to play for the Beijing Shougang Ducks of the Chinese Basketball Association season, he and the team announced Tuesday.

"Thanks to the NBA and everyone who's supported me the last 9 years!" Lin tweeted. "Will always cherish being able to rep Asians at the NBA level. Excited for the next step with the Beijing Ducks. Excited to make more history."

Thanks to the NBA and everyone who's supported me the last 9 years! Will always cherish being able to rep Asians at the NBA level. Excited for the next step with the Beijing Ducks. Excited to make more history. Congrats lil bro on signing your contract extension on the same day! pic.twitter.com/gRoalAaoal — Jeremy Lin (@JLin7) August 27, 2019

Lin, who played for the champion Toronto Raptors this past season, had hoped to stay in North America. But with the 2019-20 NBA season now just five weeks away, it'd become clear to the league's first Chinese American player that there was little interest from domestic clubs.

Lin was a bench warmer living on his brother's couch in New York before taking the league by storm in early 2012 and helping to lead the Knicks into the playoffs that season. Fans dubbed Lin's remarkable run "Linsanity."

He signed a free-agent deal with the Houston Rockets the following summer but was never able to recapture the magic of Linsanity. He's also played for the Golden State Warriors, the Los Angeles Lakers, the Brooklyn Nets, the Atlanta Hawks and the Charlotte Hornets.

Lin, whose parents immigrated to the United States from Taiwan, leaves North America with a career average of 11.6 points and 4.3 assists per game in the NBA.

The 31-year-old former New York Knicks guard will now play for the same Chinese team that made another one-time Knick star, Stephon Marbury, a hoops legend in the world's most populous nation.