Boufal hammered home from close range after a mazy run into the penalty area from Zakaria Aboukhlal that saw him tease the Ghana defence, only to be checked by Thomas Partey, with the ball then running perfectly for Boufal to score.
The goal came from a rare chance in a game where both sides showed defensive prowess but did little to impress in attack.
Both countries are looking to end a long wait for success in the continental championship but showed little early sign of making an impact at the tournament in Cameroon, admittedly after disrupted preparations.
Boufal’s goal did open up a cagey affair and Morocco had two more decent chances as captain Romain Saiss headed wide after an 87th minute free kick and then in stoppage time Ghana’s keeper Joe Wollacott stopped a blistering shot.
Until then, there had only been two opportunities for Ghana.