The South Africa international, who joined Blackburn from Belgian club Genk at the start of 2005 before moving to Portsmouth last summer, thumped home a header after 58 minutes to restore Pompey's lead after Jon Stead had cancelled out John Utaka's opener on 51.
After Mokoena's goal, Hayden Mullins sealed the win on the break in the fourth minute of injury-time.
Following the 6-1 demolition of Leicester on Friday night, victory gave Pompey back-to-back home wins for the first time since December.
Steve Cotterill named an unchanged starting XI, while the only change for Bristol City saw teenage defender Steven Caulker, signed on loan from Tottenham yesterday, make his debut as Danny Haynes dropped to the bench.
Albert Adomah had two shots on target inside the first 10 minutes and again just after the half-hour mark, but Portsmouth goalkeeper Jamie Ashdown made routine saves on all three occasions.
David James, returning to the club where he spent four years before leaving to join Bristol City in the summer, was called into more athletic action after 37 minutes when he tipped Mullins' close-range header over the crossbar.
At the other end, Ashdown pushed a long-range effort from Stead around a post two minutes later.
Portsmouth should have taken the lead in the final minute of the first half when James parried David Nugent's shot from the edge of the box and Dave Kitson fired the rebound over the crossbar.
Utaka did put Pompey in front six minutes into the second half, though, the Nigeria international controlling the ball on the edge of the area and firing a low shot into the corner.
However, Stead had City level in the 53rd minute when his shot from Adomah's cut-back trickled into the corner of Ashdown's goal.
Cole Skuse forced Ashdown into a save as the visitors threatened to take the lead, but the next goal went to Mokoena as he powerfully headed home from Liam Lawrence's corner.
James kept City in the game with a save to deny Kitson midway through the second half and the visitors put Portsmouth under pressure for the rest of the 90 minutes without testing Ashdown.
They were then caught on the break in the late stages as Nwankwo Kanu crossed from the left for Mullins to turn the ball home from inside the six-yard box.