This work studies the impact of the perception of the constraint imposed by the business environment on the disposition of Moroccan informal micro-enterprises to move to the formal sector. We test the hypothesis that this disposition to formalize is based on a profit maximization model consisting in comparing the advantages and costs of setting up in the formal and informal sectors. Using data collected from 100 informal micro-entrepreneurs and using step-by-step logistic regression, we find that the decision of microenterprises to structure themselves is dependent on the socio-economic characteristics of the country in question (macroeconomic context, legal and business regulations, etc.). In addition, we find that the desire for formalization is negatively impacted by perceptions linked to the unavailability of basic infrastructure (electricity, water, telephone, etc.), access to finance, access to premises, access to public contracts, access to information as well as the burden of administrative procedures. These results suggest that improving the business environment and general governance could further drive microenterprises to take the step towards formal entrepreneurship, thus providing a broader tax base and other benefits to society in the future.