Liam Buchanan fired a hat-trick as Cowdenbeath went goal crazy and Alloa had Ross Clark sent off.
Buchanan opened the scoring in the first minute, before Alloa drew level from the spot through Steven McKeown.
Laurie Ellis put the home side in front just before the break, and the Fifers then hit three in quick succession.
Buchanan struck in 48 minutes and 62 minutes, then Ellis made it 5-1 four minutes later. Chris Mackie pulled one back for the visitors.
Cowdenbeath: Hay, Baxter, Hill, Hannah, McBride, Paatelainen (Husband 89), Patrick Scullion, Lennon, Ellis, Buchanan (Manzie 88), Clarke (Dalziel 76).
Subs Not Used: Fusco, Allison.
Booked: Clarke, Baxter, McBride.
Goals: Buchanan 1, Ellis 43, Buchanan 48, 62, Ellis 66.
Alloa: Creer, McKeown, Malcolm (Bolochoweckjy 62), Forest, Ovenstone, Clark, Grant, McColligan, Sloan, McCalum (Stuart 71), McClune (Mackie 53).
Subs Not Used: Comrie, Hutton.
Sent Off: Clark (78).
Booked: Forest, Grant, Ovenstone.
Goals: McKeown 23 pen, Mackie 72.
Ref: E Norris