The Dons signalled their intent to earn a first-leg advantage early on, with Adam Rooney heading narrowly wide of the post on six minutes.
Rooney was then felled in the area as the Scottish Premiership outfit were given the chance to break the deadlock from the penalty spot on the 15-minute mark.
However, the Latvian side survived once more as Barry Robson saw his tamely-struck spot kick comfortably saved by Emilijius Zubas.
Unperturbed by the miss, Derek McInnes's side continued in the same vein and saw their perseverance rewarded shortly after the half-hour mark as Shay Logan headed home a Jonny Hayes cross to earn a slender, yet deserved half-time lead.
McInnes got the better of his opposition number in the team-talk stakes, as Aberdeen emerged from the interval and quickly trebled their advantage.
Niall McGinn added a second early into the second half, smashing home at the second attempt after Zubas saved his initial effort, before Rooney converted a penalty three minutes later.
Riga's task grew steeper on 55 minutes as the Latvians saw the first of two dismissals, with Vitalijs Zils sent off for a second yellow.
Aberdeen capitalised on their numerical advantage as Hayes stabbed home a Rooney cross on 73 minutes, but there was yet more drama as Aurimas Kucys was also dismissed following a second booking.
McInnes's side sought to heap further misery on the nine men of Riga, and succeeded late on as Rooney bagged his brace to give the Scots a five-goal advantage ahead of next week's away leg.