La Real stunned Real Madrid at the Santiago Bernabeu in the previous round, but Mirandes had knocked out three LaLiga teams en route to the last four and caused concern for top-flight opposition once more.
Captain Mikel Oyarzabal dispatched a ninth-minute spot-kick for Sociedad, yet they were pegged back by Matheus Aias and scarcely deserved the second Martin Odegaard lashed in to restore their lead before the interval.
The second period brought marginal improvement in the home ranks but no further goals, leaving the tie in the balance ahead of the return fixture next month.
Sociedad's opener came only after Alex Remiro was forced into a smart, low stop from Martin Merquelanz with just five minutes on the clock.
Portu earned a penalty as Odei Onaindia dallied in the area and allowed the home winger to get between man and ball before going down, and Oyarzabal coolly converted from 12 yards.
Mirandes deservedly levelled six minutes before half-time, as Mickael Malsa pounced on some careless play 20 yards from goal and fed Matheus Aias, the striker twisting to send in a low shot that deflected beyond Remiro.
But Sociedad responded swiftly. Limones spilled Odegaard's powerful drive but recovered well to block Portu's follow-up, only for the Real Madrid loanee to rifle in a second rebound.
Matheus Aias blazed over from close range heading into the break, while there were big saves at either end following the restart, Limones denying Portu before Remiro parried an Antonio Sanchez strike.
The two goalkeepers were largely underworked thereafter until Limones superbly turned away a header from one of his own defenders in the fourth minute of stoppage time, teeing up an intriguing second leg at Estadio Municipal de Anduva.