The striker ended his goal drought to claim his 10th of the season before Andy King's late strike clinched the Foxes' third straight win.
It is the first time they have won three in a row in the top flight since September 2000 and are now only in the relegation zone on goal difference.
Leicester deserved victory with a passionate, swashbuckling display with the superb Esteban Cambiasso at the heart of their efforts.
But they needed Kasper Schmeichel to deny Nelson Oliveira in the second half to ensure victory.
Ulloa was originally named on the bench but David Nugent suffered a tight calf and the Argentinian replaced him at the last minute.
Marcin Wasilewski, King and Andrej Kramaric were recalled after last week's 3-2 win at West Brom while Swansea replaced the suspended Neil Taylor and injured Bafetimbi Gomis with Jordi Amat and Oliveira.
But without front man Gomis the visitors were toothless in the first half as the Foxes bombarded them from the off.
Marc Albrighton curled wide before Leicester grabbed the breakthrough their dominance deserved after 15 minutes.
Wasilewski lofted a long ball forward for Ulloa to flick on to Wes Morgan and when the ball came back to Ulloa he drilled into the corner from 10 yards.
Jonjo Shelvey fired over as Swansea searched for a way back into the game after being outplayed for the first 25 minutes.
Gylfi Sigurdsson tried to test Schmeichel but the hosts were comfortable, although failed to find a killer second.
The Foxes continued to press after the break and Albrighton fired wide before Kramaric curled over after outpacing the Swans' midfield.
Swansea finally forced Schmeichel into a save after 53 minutes when he turned Shelvey's 18-yard effort away.
It was a testament to the Foxes the keeper had been so well protected but they needed a second goal and Ulloa headed onto the roof of the net and Kramaric blazed over.
But, Swansea finally began to threaten and the hosts required Schmeichel to be at his best to deny Oliveira on 66 minutes.
The striker wriggled through the Foxes' defence with only Schmeichel to beat but the keeper denied him with his legs before gathering Shelvey's shot a minute later.
Leicester were living dangerously and Jefferson Montero's strike deflected over before the Foxes should have wrapped up the game.
From the corner Jamie Vardy broke with men over but his pass to Riyad Mahrez was poor and allowed Lukasz Fabianski time to make the save.
Vardy's strong penalty claims then went ignored after the forward had gone down from Ashley Williams' challenge.
Swansea's second-half rally appeared to have ended as Leicester regained control and Fabianski denied Mahrez with seven minutes left.
But the keeper gifted the hosts a game-clinching second with a minute to go when he spilled Cambiasso's free kick and King netted the rebound.
Source : PA
Source: PA