Ibrahimovic volley settles Clasico
The visitors successfully frustrated Barca until substitute Ibrahimovic made the breakthrough by smashing a volley past Iker Casillas in the 56th minute.
Shortly afterwards, Barca midfielder Sergio Busquets foolishly picked up his second yellow card to leave his side a man short for almost 30 minutes.
However, Real could not make the extra man count in a pulsating finish and champions Barcelona went to the top with 30 points from 12 games, two ahead of Real who slipped back to second.
"We struggled today because Real played very well. They knew what they were doing, keeping it tight at the back and very compact," Barca captain Carles Puyol told reporters.
"Ibrahimovic is one of the best players in the world and, even though he wasn't 100 percent, his goal was essential. You couldn't have a better debut in a 'clasico' than he's had."
There were five candidates for the 2009 Ballon d'Or on display at the start, with favourite for the award Lionel Messi, Xavi and Andres Iniesta in the starting XI for Barca.
Another candidate, Ibrahimovic, was on the bench after his recent thigh strain.
Real, who have invested around 250 million euros ($373 million) in new signings over the close season, fielded Kaka and Ronaldo, even though the Portuguese winger had played only 20 minutes since his two-month layoff with an ankle injury.
Barca dominated the early exchanges but the first clear chance fell to the visitors after 19 minutes when Kaka set up Ronaldo for a free shot. Victor Valdes saved with an outstretched foot.
Real grew in confidence, working hard to disrupt Barca's midfield, and started to get behind their hosts' defence with quick breaks.
Puyol flung himself across to block a shot from Marcelo but openings remained at a premium.
Thierry Henry made way for Ibrahimovic early in the second half but it was Real who streaked away on a counter-attack led by Ronaldo and, again, a despairing challenge from Puyol extinguished the danger in the area.
Barca broke the deadlock when Daniel Alves crossed deep to the back post and Ibrahimovic scored with a fierce volley.
The hosts were almost immediately on the back foot when Busquets' deliberate handball saw him sent off.
A rusty-looking Ronaldo made way for Karim Benzema as Real pressed forward in search of an equaliser, but the Frenchman spurned a great chance hoofing over the bar at a corner.
Gerard Pique and Eric Abidal went close at the other end as the game opened up and Alves fed Messi for what should have been the decider at the end but Casillas pulled off a magnificent save.
Real lost midfielder Lassana Diarra to a red card in the last minute.
"We had a lot of chances, especially the one Ronaldo missed in the first half, but we failed to take them. They made the most of theirs," Casillas told Canal Plus television. "The result is very unfair. We deserved a draw."