The 24-year-old German international is regarded as one of the finest attacking midfielders in the world and arrives in London after three successful seasons in the Spanish capital.
Having completed his medical on Monday in Germany, where he is with the national squad, Ozil said: "I am thrilled to be joining a club of the stature of Arsenal and am looking forward to playing in the Premier League.
"It will be great for my own personal development as a player and I am particularly looking forward to working with (manager) Arsene Wenger.
"From our negotiations it is clear the club has huge ambition and I look forward to being part of an exciting future."
Wenger added: "We are extremely pleased to have signed Mesut Ozil.
"He is a great player, with proven quality at both club and international level. We have watched and admired him for some time, as he has all the attributes I look for in an Arsenal player.
"I have said throughout the summer that we have been working hard to bring in top quality players to this football club.
"This has involved many, many people across the club and I have always had the full support of the club in making decisions on the football side.
"Mesut is a top quality footballer who will be a fantastic addition to our talented squad. We are all looking forward to him joining up with us after his international matches with Germany and working with us as an Arsenal player."
Arsenal chief executive Ivan Gazidis said: "This is an exciting day for all of us. We have signed a world-class player who is one of Europe's brightest young talents.
"Mr Kroenke, our controlling owner, has always fully supported Arsene and the club in making significant investments to strengthen our squad and to bring in talented players, who fit our style and ambitions.
"Like all of us, Mr Kroenke wants to see Arsenal winning titles and trophies and he has absolute faith and belief in our manager to achieve that. We will continue to work towards that goal and look forward to an exciting season."
You know what bothers me? The fact that some people just cannot be satisfied. We beat Spurs with a weakened side, we bought one of the best players in the world, and there are people complaining. Get a life or get lost.- Geddy76