Sociedad had knocked out Real Madrid 4-3 in the quarter-finals and they were in control early on at home against Mirandes, the only second-tier side to make the last-four.
Captain Mikel Oyarzabal gave them a ninth-minute lead from the penalty spot after a foul by Odei Onaindia on Portu.
Mirandes were on level terms on 40 minutes thanks to Matheus Aias but Sociedad restored their advantage through Norwegian prodigy Martin Odegaard just two minutes later.
Mirandes, however, will not be cowed by the challenge in the second leg next month as they bid to become the first second division side to make the final in 40 years.
They have already knocked out three top flight teams to get to this stage having seen off Celta Vigo, Sevilla and Villarreal.
On Wednesday, captain Iker Muniain scored the only goal as Athletic Bilbao defeated Granada 1-0 in their first leg clash.
Muniain, 27, had been red-carded in his team's 2-1 defeat by Sociedad in La Liga at the weekend.
However, he was the toast of the city Wednesday when he latched onto a cross from Inaki Williams just three minutes before the interval to score the game's only goal.
Athletic coach Gaizka Garitano named the same team which shocked Barcelona in the quarter-finals last week and they will consider themselves unfortunate not to have won by a greater margin after having two strikes ruled out for offside.
The second, scored off a fine volley in the 61st minute by Ander Capa, needed an intervention by VAR.
With 23 titles, Athletic Bilbao are second on the all-time list to Barcelona who have triumphed 30 times.
However, their most recent success was back in 1984 after a 1-0 win over Barca.