The victory secured the World Cup favourites top place in Group A, with a better goal difference than Mexico, and in theory an easier tie in the second round.
Brazil coach Luiz Felipe Scolari will be more reassured by the free flowing display by a team who appeared uncertain and sluggish in beating Croatia 3-1 and fragile in their goalless draw with Mexico.
Neymar's first goal in the 17th minute was the 100th goal of the high-scoring tournament in Brazil's 100th match in World Cup finals. Luiz Gustavo crossed from the left and Neymar sidefooted it into the net.
Moments later, Neymar cannoned a shot that Cameroon goalkeeper Charles Itandje could barely parry away.
Cameroon then pulled level through Joel Matip, who briefly exposed Brazil's defensive frailty.
But Brazil's number 10 scored a second before half time, picking up the ball on edge of the penalty area and shooting through the legs of defender Nicolas Nkoulou.
The Barcelona striker's fourth goal of the tournament puts him at the top the scorers' rankings for the current World Cup edition.
Fred headed the third goal in the 49th minute from a David Luiz cross and Manchester City midfielder Fernandinho strolled through the Cameroon defence in the 84th minute to score the killer goal.
Cameroon finished their tournament at the bottom of Group A with three straight defeats.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ