Iheanacho made the starting eleven as first choice striker Jamie Vardy was absent following the birth of his daughter.
Iheanacho opened scoring with five minutes remaining in the first half but Pablo Fornals equalised on the stroke of half-time for West Ham.
And in the 56th minute Demarai Gray scored what proved to be the winner for Leicester.
Reacting to the win, Iheanacho hailed the three points, the overall team performance and Gray for also getting on the score sheet.
“Another goal, three points, great performance happy for my bro Demarai. Leicester City fans was magic,” he wrote on his verified Twitter handle.
The goal was his third in four Premier League games.
Leicester are now back in second position on 42 points, in the league table.