It enabled the Foxes to celebrate four straight wins at the start of a season for the first time.
A fine strike from Aaron Ramsey looked like earning Cardiff a point after Wanya Marcal-Madivadua fired Maresca’s hosts ahead.
But on-loan Chelsea midfielder Casadei had the last word to leave Cardiff, who saw defender Mahlon Romeo sent off deep into stoppage time, remain winless under their new manager Erol Bulut.
The 20-year-old Casadei, who had only arrived on Wednesday, came off the bench to lash home a last-gasp clincher before referee Graham Scott could blow for a penalty for a foul on Jamie Vardy.
“I said to Cesare the only way to score a goal for an attacking midfielder is to be inside the box,” said Maresca.
“Everything in football happens inside the box. Ramsey scored from 40 metres but this is Ramsey, it doesn’t happen often. Cesare, one of his strengths is to arrive in the box.”
Maresca inherited a squad that suffered relegation from the Premier League last term and he has since seen fan favourites James Maddison and Harvey Barnes leave.
More departures could follow but Maresca was delighted that the players who remained had got the season off and running so well.
A tailing-off in performance towards the end of the game was understandable too, he added.
“It is important always to win a game and in this moment especially for the fans and the club after last year,” he said.
“It is important to renew new energy but also I analyse not only the results. It was important to see how the team improves game after game.
“Probably for me it was our best half. We created many chances, we scored a goal and after that Stephy (Mavididi) had a chance one-on-one with the keeper and after that there was a clear penalty for Stephy. After that we conceded just one shot, a goal from Ramsey that was unbelievable and we started the second half still thinking about the goal.
“In this moment we cannot think the team over 90 or 105 minutes is also playing like the first half.”
Marcal-Madivadua’s 36th-minute opener – a high-velocity effort from 15 yards out through a crowd of players after Cardiff had failed to clear a corner – was a first senior goal for the 20-year-old from Portugal.
Out of nowhere, however, Ramsey launched a stoppage-time long-ranger into the top corner to level.
“I think goal of the year maybe,” said Bluebirds boss Bulut. “You don’t always see goals like this and it was the reason we got back in the game.”
That was true and Cardiff might have gone ahead when half-time substitute Yakou Meite was sent through by Romeo but could not hit the target.
“In the second half we had our chances,” Bulut said. “Meite’s was the biggest one. He, in my opinion, hit it a bit quick.
Casadei made Cardiff pay at the death with a winner and Romeo’s second yellow for barging Kiernan Dewsbury-Hall over off the ball swiftly followed.
Cardiff were left to rue what might have been, as they had at Leeds on the opening day when a two-goal lead was finally surrendered in stoppage time.
“What I have to say, and I have said it also before in Leeds, where we were leading at 90-plus, that football is details. With details you win, with details you lose,” Bulut said.
“The second half from my team was great. How many chances to you need to create against Leicester to win the game? Today we could have made it 2-1 and maybe 3-1. We should have won the game but in the end we didn’t manage to score and we lost unluckily.
“These are the things we have to manage better. When we have the chances we have to take them.”