The Atlas Lions struck early, with goals from Reda Zahraoui (4th minute), Badr Krichli (10th), and Driss Ghannam (15th). Zouhair Jabbari added a fourth in the 32nd minute to seal the win, despite a strong Tanzanian effort.
Morocco shares Group A with Tanzania, Egypt and Ghana, while Group B includes defending champions Senegal, Mozambique, Malawi and Mauritania.
The Moroccans will face Ghana in their next group match.
The AFCON Beach Soccer tournament serves as a qualifier for the 2025 FIFA Beach Soccer World Cup, set to be held in the Seychelles.