In December 2019, in Wuhan, China, a new disease was detected, and the virus easily spread throughout other nations. March 2, 2020, Morocco announced 1st infection of coronavirus. Morocco verified a total of 653,286 cases, 582,692 recovered, 60,579 active case, and 10,015 as confirmatory fatalities, as of 4 August 2021. The objective of this article is to study the mathematical modeling of undetected cases of the novel coronavirus in Morocco. The model is shown to have disease-free and an endemic equilibrium point. We have discussed the local and global stability of these equilibria. The parameters of the model and undiscovered instances of COVID-19 were assessed by the least squares approach in Morocco and have been eliminated. We utilized a Matlab tool to show developments in undiscovered instances in Morocco and to validate predicted outcomes. Like results, until August 4, 2021, the total number of infected cases of COVID-19 in Morocco is 24,663,240, including 653,286 confirmed cases, against 24,009,954 undetected. Further, our approach gives a good approximation of the actual COVID-19 data from Morocco and will be used to estimate the undetected cases of COVID-19 in other countries of the world and to study other pandemics that have the same nature of spread as COVID-19.