This paper aims to identify the determinants of Moroccan banks’ profitability, measured by Net Interest Margin (NIM) during the period (2005-2018). Applying the ordinary least square (OLS) method and panel data analysis for the eight (8) main Moroccan banks, five (5) econometric linear models were used, including bank-specific variables (size, capitalization, operational efficiency, credit-risk, liquidity, deposits), industry level and macroeconomic variables (concentration and economic growth). The empirical results showed that NIM is exclusively influenced by internal factors. External factors don’t have any significant impact on profitability during the considered period. Bank size was found to have a significant negative effect on NIM. The other factors that have negative impacts are diversification and level of deposits. Whereas credit risk, capitalization and operational efficiency tend to increase profitability of banks in Morocco in terms of NIM. Consequently, Moroccan Bank managers who want to increase the profitability of their banks should ensure to increase the level of bank capital, reduce the level of the general operating expenses, take more credit risk and not bet on income diversification nor on the growth of assets’ size which are not favorable to improving the Net Interest Margin. This is the first study of the determinants of Moroccan banks NIM during a large period including the major part of the period of BASEL III framework implementation. This research is of great interest insofar as the results obtained allow bank managers to better understand the factors that act on the profits and offer them better levers for action, control and forecasting. It also provides banks regulators with insights to eventually review the prudential system applicable to banks. The external factors examined in this study are limited to the growth of GDP and concentration. The effect of other external factors such as taxation, exchange rate, interest rate, inflation… could be examined by future studies on Moroccan banking system profitability.