Aina hit target 12 minutes from time at the City Ground.
It was a left-footed rocket from outside the box that gave the West Ham goalkeeper no chance.
The goal was the Nigeria international’s first for Forest in the Premier League this season.
Chris Wood and Callum Hudson-Odoi were the other goal-scorers for Nuno Espirito Santo’s side.
Aina’s compatriot, Taiwo Awoniyi also featured for Nottingham Forest in the game