Aluko lofted home a 56th-minute winner after Alloa midfielder Andy Scott’s penalty had cancelled out Lee Miller’s fortunate early opener.
Alloa pushed forward for much of the last half hour but the Dons survived to move into the fifth round.
Jimmy Calderwood had considered resting several players in light of Alloa’s artificial pitch, but he was pleasantly surprised by the surface when his squad trained on it during the week.
And he was no doubt relieved he had picked his strongest team after facing a tough test from the Irn-Bru Second Division strugglers.
The Aberdeen boss brought back Chris Maguire and the fit-again Charlie Mulgrew as his team avoid a second successive shock in the tournament following their 4-3 semi-final defeat by Queen of the South last year.
They quickly settled any nerves when Miller gave them an eighth-minute lead. Mulgrew and Brown Ferguson had previously threatened from 25-yard free-kicks at either end and the Dons briefly found themselves under some aerial pressure amid the driving wind and rain.
But Alloa midfielder John Grant gave the ball away on the halfway line and Aberdeen broke quickly down the left before Maguire’s 20-yard strike hit off Miller’s chest and deflected past Raymond Jellema.
The visitors took control and Dougie Hill cleared Aluko’s shot off the line as Alloa defended inside their penalty area.
But Alloa forced themselves out of their own half in the latter stages of the first period and Grant flicked just over after Chris Townsley had headed Iain Campbell’s corner back across goal.
And the hosts levelled in the 41st minute as they put the ball in the net for the second time in the space of three minutes.
Referee Steven Nicholls had blown for a penalty just as Hill was volleying home Scott’s left-wing free-kick touchline despite being pulled back by Scott Severin.
Scott had to endure a long delay as Severin was booked as the Aberdeen fans threw toilet rolls into the penalty box and Nicholls explained his decision to the fourth official. But justice was done as the wide player stroked his penalty into the top corner.
Darren Mackie replaced Jeffrey de Visscher for Aberdeen at half-time and Richard Foster drove just wide from 30 yards as they looked to regain their lead.
Alloa’s final ball let them down after a couple of promising breaks and they were punished in the 56th minute as Aluko provided a quality end to a route-one move.
Miller headed on Langfield’s kick-out and the former Birmingham winger raced ahead of the home defence before lifting the ball over the onrushing goalkeeper.
Alloa refused to buckle though. Hill headed a yard wide from a corner and Scott just failed to connect with the ball in the six-yard box as he threw himself at Ferguson’s cross.
The impressive Ferguson then volleyed over from 16 yards after Langfield had fumbled a corner, before Aberdeen were inches away from killing off the tie in the 75th minute. Maguire turned Mulgrew’s long free-kick across the face of goal and Mackie slid in to fire off the top of the bar.
Striker Andy Ferguson replaced Kyle MacAulay as the Wasps pressed for the equaliser. He headed on to the roof of the net from Pat Scullion’s near-post cross and then sent a diving header wide after David McClune’s centre found him unmarked six yards out.
However, Aberdeen saw out the last few minutes comfortably and almost gave a flattering sheen to the scoreline. Mackie’s weak finish was blocked on the line as Jellema committed himself following a long ball, and the Alloa keeper palmed away Mulgrew’s 30-yard free-kick.