The 21-year-old midfielder, who has made just one senior appearance for the reigning European champions, is a former Spain Under-18 international.
He recently impressed for Real as a substitute in their International Champions Cup matches against Inter Milan and Roma, and manager Carlo Ancelotti was keen for him to gain further experience out on loan.
Derby head coach Steve McClaren said: “We’re delighted that we have been able to bring Omar to the club.
“He is a talented young player and I have monitored his progress for a number of years after first coming to my attention whilst in Holland at FC Twente.
“Our head of football operations Chris Evans has worked tirelessly to get this deal over the line and spent a few days in Spain thrashing out a deal with Real Madrid.
“We would like to thank Real for allowing Omar to spend the season with us and we are looking forward to working with him.”
Derby's chief executive Sam Rush added: “I am delighted with our relationships with some of the top clubs in world football.
“We have established a good working relationship with Real Madrid and look forward to that continuing long into the future.”
Mascarell’s arrival is Derby’s ninth of the summer and he joins another former Spain youth international in Ivan Calero, who signed from Atletico Madrid on a Bosman free transfer.
McClaren has also brought in Leon Best on loan from Blackburn Rovers as well as George Thorne on a permanent basis, Zak Whitbread, Alefe Santos, Jonathan Mitchell, Cyrus Christie and Shaquille McDonald.
The Midlands club begin their Sky Bet Championship season at home to newly promoted Rotherham on Saturday at 3pm.