Isco, 21, has long been linked with Madrid and the arrival of new coach Carlo Ancelotti, who was unveiled as the successor to Jose Mourinho yesterday, has accelerated the transfer.
"Real Madrid incorporates a new project with one of the best Spanish football players," the club said in a statement.
"Francisco Roman Alarcon - Isco - plays at the Bernabeu for the next five seasons."
The financial terms of the deal were not disclosed, but reports in Spain suggest the fee will be in the region of 27 million euros.
Isco recently starred as Spain's Under-21 team retained the European Championship, scoring three times in their successful campaign in Israel.
He was the winner of the prestigious European Golden Boy award in 2012, and last season played a major role as Malaga reached the quarter-finals of the Champions League - losing narrowly to eventual finalists Borussia Dortmund - and finished sixth in La Liga.
Isco made 45 appearances in all competitions for Malaga last term, scoring 12 times, and made his senior Spain debut against Uruguay in February.
"Imagination and speed are some of the qualities that define this midfielder... a recent champion with Spain at Euro Under-21 and at age 21 already capped by the senior team," Madrid's statement added.
"[He is] a player with enviable technical quality, chutzpah and imagination."
Malaga also confirmed the deal in a statement on the club website, which read: "Malaga Football Club has reached a transfer agreement with Real Madrid for Francisco Alarcon Suarez 'Isco'.
"Malaga CF would like to thank 'Isco', and his family, for his commitment, involvement and flawless performance."
Madrid president Florentino Perez first revealed the agreement with Malaga in a radio interview last night, in which he confirmed the player would be presented "next week after the medical".
New coach Ancelotti was asked about the former Valencia man yesterday at his press conference.
The Italian said: "From what I have seen of him, it's clear he has a lot of quality.
"Spain's Under-21 side has a lot of great players and he is one of the best.
"He could get into any team in the world, so he could also play for Madrid."
Isco is Madrid's second acquisition of the summer after they re-signed full-back Dani Carvajal on a buy-back deal from Bayer Leverkusen.
Meanwhile, Sergio Ramos has given his backing to Ancelotti and revealed he is looking forward to wiping the slate clean after a difficult final season under Mourinho.
The defender came in for public criticism on more than one occasion from the Portuguese and was also dropped from the starting line-up for a Champions League tie with Manchester City.
"People have spoken very well about Ancelotti to me, both on a personal and a professional level," Ramos told AS.
"At last we have a coach and I'm delighted about that."
The Italian has been labelled a "peacemaker" by the Spanish press and Ramos hopes his arrival will mark a fresh start.
"We hope that the bad times have come to an end," he said.
"There have been tough spells but everything passes. We need to remember the good times and not be resentful or speak bad about what has happened. I'll remember the positive aspects and I can forget about the other aspects easily. Life goes on.
"I'm fine at Madrid, I can't complain. I'm happy there, which is the most important thing, and I would like to continue there."