Porto released a statement on 17 June saying the Gunners would pay an initial 35m euros (£29.9m) for the 22-year-old, with the rest in potential add-ons.
“I am very excited that we have identified and signed such a special talent,” said Gunners boss Mikel Arteta.
“Fabio is a very creative player that will bring high quality and versatility to our attacking play.”
Vieira has yet to win a senior cap for Portugal, but was voted player of the tournament at last year’s European Under-21 Championship.
He scored six goals and provided a league-high 14 assists in 27 Primeira Liga outings last season as he helped Porto claim the top-flight title in Portugal.
“Fabio is a player with special qualities who is comfortable with the ball in the final third of the pitch,” added Arsenal technical director Edu.
“We are all looking forward to working with him and enjoying his future contribution to Arsenal.
“We will now continue to work hard and are looking forward to finishing this transfer window as strongly possible.”
Vieira has become the Gunners’ third summer arrival, following USA goalkeeper Matt Turner and teenage Brazilian forward Marquinhos.
He says he has spoken to Arteta, but has yet to meet the Spaniard in person.
“This is an important step forward in my career,” Vieira told the club’s official website.
“It certainly was a fast process. It was something that I was drawn to. Meeting the people at the club was a real positive for me. I’m loving it here and I’m here to give the team my all.
“I’m an attacking player who looks to find space between the lines, to be able to finish off moves either with assists or by scoring goals.
“I think those are the main attributes that Arsenal fans can expect from me.”