Terms of the deal were not released by the team, but a source told ESPN.com that the contract is for Charlotte's biannual exception -- two years and $4.3 million.
Lin had announced his intentions on Instagram on Wednesday night.
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 back up 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 news 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 Knicks in 2012 sparking the "Linsanity" craze. After his memorable season there, 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.
Information from The Associated Press was used in this report.
"We are excited to add Jeremy Lin to our lineup," Charlotte general manager Rich Cho said. "He is a talented player who we feel can make significant contributions to our basketball team."
A source confirmed to ESPN.com that the contract is for Charlotte's biannual exception -- two years and $4.3 million.
Lin posted the Hornets logo on his Instagram account to announce the agreement:
The Dallas Mavericks had been optimistic they would sign Lin, attempting to create a salary slot for him by shopping point guard Raymond Felton, sources said. Lin made his commitment to the Hornets while the Mavs were in the midst of dealing with prized center DeAndre Jordan's decision to renege on his verbal commitment to Dallas and return to the Los Angeles Clippers.
Lin was an unrestricted free agent after making nearly $15 million last season with the Los Angeles Lakers. He bounced in and out of coach Byron Scott's starting lineup and endured criticism from Scott and Lakers icon Kobe Bryant.
Lin acknowledges he got off to a rough start but eventually grew more comfortable in Scott's system.
In 74 games, including 30 starts, Lin averaged 11.2 points, his lowest total since his rookie season, on 42 percent shooting from the field, also his lowest since his rookie season. He started the team's first 19 games before being moved to the bench.
"The one thing about him: The kid takes criticism," Scott said. "You can jump on him about things, and he takes it with a grain of salt and he tries to get better. That's the one thing I do love about him. He doesn't pout about it. He doesn't cry. He just goes out there and tries to implement the things that you give him and become a better basketball player."
The Lakers were the fourth NBA team in five seasons for Lin, who gained international fame during a dynamic 35-game stint with the New York Knicks in 2012.
The former Harvard standout began his NBA career with the Golden State Warriors in 2010-11, appearing in 29 games, before moving on the Knicks. He joined the Houston Rockets via restricted free agency in 2012-13 before getting traded to the Lakers following the 2013-14 season.
ESPN.com's Chris Broussard, Baxter Holmes and Tim MacMahon and The Associated Press contributed to this report.