Terms of the deal were not released.
The 6-foot-3 Lin has played in 291 NBA games for the Warriors, Knicks, Rockets and Lakers in five seasons, averaging 11.7 points, 4.8 assists, 2.6 rebounds and 1.3 steals in 26.9 minutes.
The 26-year-old Lin is expected to backup Kemba Walker in Charlotte and run the second-team offense.
He's the latest offseason addition as general manager Rich Cho looks to upgrade an offense that finished in the bottom five in the league in almost every major offensive statistical category last season. The team previously acquired Nicolas Batum, Jeremy Lamb and Spencer Hawes in trades and drafted Wisconsin's Frank Kaminsky, The Associated Press Player of the Year in college last season.
"We have made a concerted effort to upgrade the offense" this offseason, Cho said Thursday in a conference call with reporters.
Lin is expected to be introduced Monday at a press conference.
He gives the Hornets another scoring option behind Walker.
Lin is a career 43.7 percent shooter, including 34.9 percent from 3-point range, numbers which are significantly higher than Walker's. Walker is a career 39.5 percent shooter overall, including 31.8 percent on 3s.
Cho said Lin adds a different dimension to the point guard spot.
"The one thing he can really do is get into the paint and with our second unit that is important because he can create shots for others," Cho said. "We have several guys on the second unit that will benefit from that whether it's Jeremy Lamb or Spencer Hawes, Frank Kaminsky or Marvin Williams."
Lin had a brief but memorable stint with the New York Knicks in 2012 sparking the "Linsanity" craze. He's also played for the Warriors, Rockets and Lakers.
After his memorable season with the Knicks, the Rockets signed him to a three-year, $25 million contract. He spent two seasons in Houston before being traded to the Lakers.
The 26-year-old Lin played in 74 games last season for the Lakers, averaging 11.2 points and 4.6 assists. He shot 42.4 percent from the field and 36.9 percent from 3-point range.
"We were looking to get more depth in the backcourt and we feel really good about the signing," Cho said. "He's going to bring some energy to our backcourt and our second unit. He will be a great addition."
One-third of Charlotte's roster has already changed from last season.
However, Cho said it is possible another move will be coming even though the Hornets don't have much room to maneuver under the NBA salary cap.