FIFA did not name the player or the substance, saying only that disciplinary proceedings had been opened for an "adverse analytical finding".
The player has been given until September 4 to indicate whether he wishes to have a hearing, FIFA said.
Morocco, who won the match 2-1 in Marrakech on June 8, are second in African zone Group C, five points behind Ivory Coast who have already won the group with one match to play.
Peru midfielder Joel Sanchez was banned for two years by FIFA after failing a doping test in the World Cup qualifier away to Bolivia last October.
An unnamed Jamaica player was provisionally banned for 30 days last month for failing a test following the qualifier against Honduras.
- Sports & Recreation