Leicester then doubled their lead just three minutes later through Kelechi Iheanacho, who picked up the ball in midfield after Chris Forester miscued a pass and bore down on goal for a smart, low finish past Jonathan Bond.
Iheanacho all but killed off the tie in the 29th minute by applying the finishing touch to a move started by Christian Fuchs, who burst down the left flank before delivering a pinpoint cross which was slotted beyond the reach of the Posh goalkeeper by the Nigerian striker.
The hosts gave themselves a slender chance of a miraculous fightback with a much-improved performance early in the second half which culminated in a goal just before the hour.
However, Claude Puel's charges soon regained the upper hand on the pitch and were rewarded with a fourth goal on 87 minutes as Demarai Gray's shot, saved by Bond, fell to the waiting Diabate who rifled high into the top of the net.
The debutant capped off a superb performance with an assist in injury time, beating his man in the box with ease and cutting the ball back across goal for Wilfred Ndidi to slot home.
PETERBOROUGH UNITED (4-4-2): Bond; Shephard, Tafazolli, Taylor, Hughes; Da Silva Lopes (Morias 61'), Grant, Forrester, Maddison (Borg 89'); Marriott, Lloyd (Kanu 80')
LEICESTER CITY (4-2-3-1): Hamer; Simpson, Maguire, Benalouane, Fuchs; Silva, Iborra (Albrighton 65'); Diabate, Gray, Barnes (Ndidi 64'); Iheanacho (Chilwell 80')