The Gabonese star, 31, will reportedly earn more than £200,000 per week, and bonuses could make him the club's highest-paid player, surpassing Mesut Ozil. The Arsenal captain turned down multiple offers from other clubs to remain at the Emirates Stadium.
"I want to become an Arsenal legend," Aubameyang said of his decision to stay in north London.
The deal represents a coup of sorts for Arsenal following concerns that a contractual impasse would see Aubameyang leave on a free transfer next summer.
Aubameyang's agreement also marks a statement of ambition by a club that's been absent from the Champions League for four seasons. The Gunners finished eighth in the Premier League this season, their worst standing in the top flight since the 1994-95 campaign.
Aubameyang was named 2019-20 Arsenal Player of the Season after recording 22 league goals for a second successive campaign; he finished second to Leicester City's Jamie Vardy for Golden Boot honors.
The swift-footed attacker also scored both goals in the Gunners' FA Cup final victory over Chelsea and became the quickest player in Premier League history to reach 50 goals. He found the net in Arsenal's win over Fulham to open the new campaign, too.
"It was important for Pierre-Emerick to stay with us. He's a superb player with an incredible mentality," manager Mikel Arteta said. "Being the player to have taken the least amount of time to reach 50 goals with this club tells you everything you need to know about him and his way of working."
He continued, saying: "He's an important leader for the team and a big part of what we're building. He wants to be up there with the best players in the world and leave his mark. He can achieve that here."