The French midfielder joined Arsenal in 2008 and came through the system to become a regular for the Gunners, making over 20 appearances in the league in three consecutive seasons.
His displays during the 2016/17 season drew interest over the summer, but the 26-year-old wanted to stay and fight for his place under Arsene Wenger.
Ultimately, the decision didn't work out, as the midfielder made just one start in the Premier League and racked up just 155 minutes of action in the top flight.
Coquelin completed a move away from the Gunners on Thursday and admitted during a press conference that it might have been the wrong decision to stay with Arsenal at the start of the season.
"It's true that there was interest in the summer but in my head I wanted to continue at Arsenal and do well there," Coquelin said. "It wasn't to be and now this opportunity has come up.
"I almost regret not having come before. I think it's an excellent opportunity for me and I'm very grateful. It's a big challenge, and a new start in my life for me, which I'm very excited about."
The Frenchman, who signed a new deal with the Premier League club just last year, has now inked a contract with the Spanish side that runs through 2022.