It took Karim Benzema 30 minutes to find a way past the second division play-off winners with a powerful header and Real toiled in vain for the best part of an hour with the second goal proving to be frustratingly elusive.
Carlo Ancelotti's men had perhaps been lucky to avoid conceding an equaliser to their plucky opponents at a packed-out and restless Bernabeu, but Cristiano Ronaldo eased the pressure and made the points safe on the stroke of full-time.
Real may have overcome Atletico Madrid in the capital clubs' Champions League final showdown, but the ignominy of finishing third-best to the Rojiblancos and Barcelona in La Liga has been hard to swallow.
Fuelling that sense of shame will be last Friday's Supercopa defeat to Atletico.
So on paper, facing Cordoba at home seemed the perfect opportunity to lay down a marker in the race for the Spanish championship. The Andalusian club had spent 42 years outside the top flight before returning in June.
Albert Ferrer's men were not at the Bernabeu to be brushed aside, though, and caused Real countless problems, particularly in the first half through Japanese striker Mike Havenaar.
After Ronaldo fluffed an early header, Havenaar burst into Iker Casillas' box to flash a low shot across the goalmouth and wide at the far post.
Real heeded the warning and pushed forward in search of a goal to dampen their opponents' spirits.
Luka Modric's free-kick ended up with Ronaldo, who fizzed the ball straight down Juan Carlos' throat, and in the 25th minute Sergio Ramos arrived in space to drive a dangerous volley into the Cordoba goalkeeper's gloves.
The southerners continued to probe for gaps behind Real's high defensive line but the European champions showed great focus and organisation to keep Cordoba at arm's length.
Seconds before the half-hour mark, Benzema grabbed his 73rd league goal for the Spanish giants.
Germany's World Cup star Toni Kroos picked out the France international in the Cordoba box and he rose highest to dart a bullet header beyond the flailing Juan Carlos.
Real were very nearly caught on the hop as cheers rang around their famous stadium.
First, Lopez Silva found room to slam a swerving effort just wide of a post and then, two minutes before the break, Havenaar nodded Fausto Rossi's ball from a corner agonisingly close to the target.
While thoughts of a second-half comeback might have been ambitious, Cordoba were certainly confident they could limit their illustrious opposition to a meagre winning margin and continued to frustrate them when play resumed.
It was not until the 59th minute that James Rodriguez found himself on the end of a solid opportunity, but his drilled shot from close range was parried clear by the resilient Juan Carlos.
Not 10 minutes had passed when Cordoba very nearly grabbed an equaliser from a set-piece, Aleksandar Pantic attempting an audacious overhead kick and connecting with Rossi's corner only to flick the ball over the crossbar.
Fidel soon drew a wobbly parry from Casillas and Ancelotti knew he had to make a change to stem the tide.
Withdrawing James, he introduced former Malaga midfielder Isco, whose driving runs meant Cordoba would have to retreat quickly or suffer the consequences.
As time ticked away Real continued to labour in pursuit of the second goal they needed to kill the match off and they looked to have been denied it by the offside flag when Ronaldo stole inside to ping the ball under Juan Carlos.
However, in the final 60 seconds, the Portuguese hitman made amends.
After taking possession deep on the left side, he turned and took a few strides toward the Cordoba box before hammering the ball into the net.
Diego Simeone's Atletico Madrid were held to a goalless stalemate in their Primera Division opener against local rivals Rayo Vallecano without their manager, who started an eight-match ban at Vallecas.
Atletico assistant coach German Burgos took charge in Simeone's absence, following the head coach's actions during Friday's Supercopa second leg against Real Madrid where he was sent off during the first half after aggressively remonstrating against a refereeing decision and then tapping the fourth official on the back of the head.
Unlike that Supercopa win, last season's beaten Champions League finalists failed to make their chances count and start the term in the second half of the table in 12th, one spot above their opponents.
Gabi came closest to opening the scoring for the visitors following a slow start but Abdoulaye Ba managed to block the Spaniard's long-range effort in the opening 15 minutes.
The home side came back with an effort of their own midway through the first half, but Alberto Bueno saw his 25-yard shot caught by Atletico goalkeeper Miguel Moya.
Mario Mandzukic twice tested Rayo stopper Cristian Alvarez in a matter of minutes as the away side pressed forward to break the deadlock to no avail before Koke's long-range chance sailed past Alvarez's right post as the opening half wore on.
The home side began the second half with a chance from Bueno early on, but his effort from the right of the penalty box went wide of the target.
Midfielder Koke came close with his 12-yard effort but he blasted the ball over the crossbar before Mario Suarez was the next Atletico player to have a go at the home goal, but his shot sailed wide, while Quini also missed the target as the home side came back with a chance of their own.
Miranda blocked Bueno's effort with 10 minutes to go and Manucho was unlucky not to break the deadlock for the hosts when Moya held out his close-range shot deep into the second half but neither side were able to get onto the scoresheet as they settled for a share of the spoils.