Horford revealed he was heading to Boston earlier Saturday on his Twitter account.
Celtic Pride!!!!!! 🍀🍀🍀🍀🍀🍀🍀🍀🍀🍀🍀🍀🍀🍀🍀🍀🍀🍀
— Al Horford (@Al_Horford) July 2, 2016
The deal, with includes a player option after the third year and was first reported by The Vertical, came as the team was meeting with prized free agent Kevin Durant on Saturday.
As a nine-year veteran, Horford was eligible for 30 percent of the new $94.1 million salary cap and will earn roughly $28.2 million in the first year of the deal.
League sources told ESPN's Brian Windhorst that the Atlanta Hawks' final offer was five years and $136 million, which was less than a max deal. The sources added that, with Horford's departure, the Hawks will halt trade talks regarding Paul Millsap.
The Celtics had room for two max-contract free agents this summer, and they met with Durant on Saturday night. Adding Horford to a 48-win team makes Boston a contender in the Eastern Conference and might give them a shot at attracting Durant.
Horford, an unrestricted free agent, has played his entire nine-year career in Atlanta, which drafted him third overall in 2007. The four-time All-Star averaged 15.2 points, 7.3 rebounds and 3.2 assists per game last season.
After the Hawks were swept by the Cleveland Cavaliers in the playoffs for the second straight year, Horford stressed just how much he had enjoyed playing in Atlanta and that the team still can win with some improvements to its current core.
"There are a lot of things that we need to address," Horford said of talking to his family and advisers. "But the biggest thing for me is I feel good here. I have a great relationship with Coach [Mike Budenholzer]. That is important to me. And my teammates."
"Atlanta is a city that welcomed me from the first day," he added. "I'm very grateful for people that have always been real positive toward me and my family. I feel good. I feel like the way the team is going, I feel like we can win here."
Horford was the topic of trade rumors at the deadline, with the Celtics reportedly among the interested teams.
The 6-foot-10 center, who turned 30 in June, was expected to draw interest on the free-agent market for his ability to shoot from the perimeter.
Last season, Horford shot a career-high 256 3-pointers after taking a total of 65 3s in his previous eight seasons.
"I probably got a little away from the post this year trying to expand my game and do different things," Horford said. "That is a point of emphasis, that I will try to be better in the post and be able to put the ball down a little more on the floor. Being able to drive a little more. Even though I had some strides in that area this year, I think I can be even better at that."
Information from ESPN's Ohm Youngmisuk and Chris Forsberg was used in this report.