Aubameyang’s contract saga had dragged on since last season amid speculation he wanted to join a club in the Champions League.
But the Gabon forward revealed he had committed his future to Arsenal in a live Instagram stream from the Emirates Stadium.
The deal is reported to be worth £250,000-per-week ($321,000), with bonuses that could take it beyond £350,000-per-week contract of the club’s highest earner Mesut Ozil.
“Arsenal fans, finally as you know I just signed the thing,” Aubameyang said.
Arsenal confirmed the news themselves on their website in a statement that said: “Pierre-Emerick Aubameyang has signed a new three-year contract with us!”
After scoring the goals that fired Arsenal to last season’s surprise FA Cup semi-final and final victories over Manchester City and Chelsea, Aubameyang had refused to confirm he wanted to stay at the north London club.
At one stage last term, the 31-year-old admitted he faced a big decision over his future, fuelling reports that he was ready to leave amid interest from Paris Saint-Germain and Barcelona.
But Arsenal manager Mikel Arteta remained confident Aubameyang was happy at the club and wanted to stay.
Over 100,000 people were watching the announcement via the official Arsenal Instagram account as Aubameyang pledged to follow in the footsteps of Gunners greats like Thierry Henry, Dennis Bergkamp and Ian Wright.
“Everybody knows how special this club is, I have seen incredible players, passionate players, Invincible players,” Aubameyang said.
“I dream of being one of them, amongst the best, and staying in the hearts of the fans forever.
“I want to become an Arsenal legend just like Thierry, Wrighty, Adams and Bergkamp – too many to mention.
“My dad is my biggest inspiration, he was captain of his club and his country so it means so much to me to be the captain of this special club.
“I want to leave a legacy, this is where I belong, this is my family.”
– ‘Best is to come’ –
Aubameyang was joined on the call by Wright and his current team-mate Alexandre Lacazette, who praised both his decision to sign the contract.
“Thank you for signing. Others have left us in the past but you stayed when we needed you most,” Wright said.
Aubameyang wants to win more silverware and he added: “Signing for this special club was never in doubt. It’s thanks to our fans, my team-mates, my family and everybody at this club that I feel like I belong here.
“I believe in Arsenal. We can achieve big things together. We have something exciting here and I believe the best is to come for Arsenal.”
Aubameyang moved to Arsenal from Borussia Dortmund in January 2018 and has scored 72 goals in 111 games in all competitions, including one in Saturday’s 3-0 victory at Fulham on the opening day of the new season.
He also scored a superb goal as Arsenal beat Liverpool in the Community Shield at Wembley last month.
The 2015 African Footballer of the Year finished as the Premier League’s joint top scorer in 2019.
It is major coup for Arsenal to keep Aubameyang and securing his future will maintain should allow Arteta to maintain the team’s improvement since he took charge in December.
Acknowledging the significance of keeping Aubameyang, Arteta said: “It was important for Pierre-Emerick to stay with us.
“He’s a superb player with an incredible mentality. 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’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.”