Real were aiming to make it a perfect six wins and join Barcelona on maximum points but instead Sevilla underlined their own credentials with a fifth straight win to move level on points with Real.
Sevilla were good value for the win and could have won more convincingly had it not been for Real goalkeeper Iker Casillas.
Jesus Navas headed Sevilla ahead on 33 minutes and the hosts should have scored more but for two wonder saves from Casillas.
Pepe headed home a fortunate equaliser on 49 minutes from a set-piece before Brazilian Renato netted with yet another header after 66 minutes following a great ball from the impressive Navas.
It was a first defeat for Real boss Manuel Pellegrini who had won all seven of his matches in charge at home and abroad.
Real and Sevilla both trail Barcelona by three points after the champions beat Almeria 1-0 on Saturday for a sixth successive league win, matching a club record set in 1991 and 1998.
Real had lost Cristiano Ronaldo, scorer of five league goals already this season, to an ankle injury so captain Raul came in. Sevilla fielded Real old boy Alvaro Negredo who had a point to prove after Madrid sold him for 15 million euros in the summer.
The hosts bombarded Real with crosses and should have scored in the fourth minute but Abdoulay Konko failed with a header. Sevilla got the goal they merited on 33 minutes with Fernando Navarro clipping a cross in and Navas took advantage of Marcelo's lack of awareness to bullet in a header.
With half-time approaching Casillas pulled off a miraculous save to stop a header from Renato. It stopped Sevilla going into the break with a psychological two-goal cushion and Casillas pulled off another unbelievable reflex save from Diego Perotti 90 seconds into the second half.
Sevilla should have been 3-0 up but Real made them pay with Pepe heading a 49th minute equaliser after some woeful defending. The goal lifted Real who came back into the game but Renato glanced in a header on 66 minutes to deflate Casillas and Madrid.
In other matches, Serbian striker Nikola Zigic came back to haunt old club Racing Santander, coming off the bench to score a 60th-minute winner as Valencia won 1-0 at El Sardinero.
Zigic replaced the injured David Villa on 56 minutes and took just four minutes to make an impact and push Valencia up to fifth.
Zigic scored 13 goals in 19 games on loan at Racing last season and did not celebrate the goal out of respect for the Racing fans.
It was a first win in four for Valencia although the injury to top-scorer Villa is a concern.
Villa limped off holding his hamstring and is likely to miss Spain's 2010 World Cup qualifier against Armenia next Saturday although the European champions have already qualified for the finals.
Elsewhere, Villarreal and their new coach Ernesto Valverde were still waiting for their first win of the season after a frustrating 0-0 draw with 10-man Espanyol.
"It is a bad situation and we can't hide that," admitted Valverde. "We have to be patient and keep our heads up.
"There is a long break now (due to international games) which is difficult but we can use these days to work hard and improve."
Despite their opponents being a man short for three-quarters of the match, goal-shy Villarreal could not score and were jeered by fans at El Madrigal.
Runners-up in the league just two seasons ago, Villarreal have just three points from a possible 18 and sit second from bottom of the table with their pre-season Champions League target looking a long way away.