Why didn't the Marinid try to discover and colonize the New World during the 15th and 16th centuries like the Spanish and Portuguese? They faced the Atlantic Ocean and had the power and the technology?
I believe I found the answer in Wikipedia's article on the Marinid dynasty; quite simply the dynasty was in decline from the 13th century; in the 15th century (OP's reference period), the decline was complicated by a financial crisis.
In the 15th century Morocco was hit by a financial crisis, after which the state had to stop financing the different marabouts and Sharifian families, which had previously been useful instruments in controlling the country. The political support of these marabouts and Sharifians halted, and Morocco splintered into different entities. In 1399 Tetouan was taken and its population was massacred and in 1415 the Portuguese captured Ceuta. After the sultan Abdalhaqq II (1421–1465) tried to break the power of the Wattasids, he was executed. Wikipedia: Marinid Dynasty
Citing Ezad Azraai Jamsari / Mohamad Zulfazdlee Abul Hassan Ashari, The Marinid Naval Force According to Historical Perspective (Mediterranean Journal of Social Sciences, Vol. 5 No. 29 | Doi:10.5901/mjss.2014.v5n29p26), emphasis mine:
...after the death of Sultan Abu ‘Inan Faris in the year 759/1358, the Marinid naval force was unable to defeat the Christian forces, so the Nasrid navy had to single-handedly fight the Christian forces in the Straits of Gibraltar (Musa, 1983). This situation was caused by an internal political crisis in the Marinid palace, such as the struggle for the throne and extreme dominance by the al-Wuzara’class, worsened by the spread of the ‘Black Death’ epidemic and threat of the Hafsids and the Abdalwadids, which so undermined the Marinid position that they were unable to focus on building up the naval force (al-Hariri, 1987).
The Marinid naval force became weaker and could not seriously repel enemy strength, particularly the naval forces of Castile, Aragon and Portugal after the reign of Sultan Abu ‘Inan Faris. This decline led to the collapse of the Marinid Kingdom in the year 1465. The Marinid force during this time was unable to adopt an offensive stance and acted only in defence against enemy invasion.
Although it is true that the Marinid Dynasty was in decline and such a declined status would have prevented Morocco from having the capital, as well as the resources to expand beyond their immediate sphere of influence, there may also be a larger geopolitical explanation as well.
At the beginning of the 1400's, Portugal was already moving into the Northern Moroccan coast-(and the Spanish would follow). However, by 1492, a united Spain had the financial resources, the political strength, as well as the maritime technology to block any Moroccan advancements Westward. (A sizable portion of Spain's growing wealth and technological sophistication was attributable to its centuries long conquests of territories held by the Spanish Moors).
In the case of 16th century Portugal, their overseas empire, was, to a great extent, an Atlantic based empire; and even a small country, such as Portugal, also had the financial resources, political strength, as well as the maritime technology to also block any Moroccan advancements westward.
The increasingly weakened financial and political status of Morocco, combined with the growing financial, political and maritime strength of the Iberian peninsula, may help to explain as to why, despite its geographical position, Morocco, was unable to explore and conquer the wider Atlantic region during the 15th and 16th centuries.
From the 15th to 20th centuries, the Moroccans had a love-hate relationship (but mostly the former) with the Ottoman Empire. For most of that period, they could get trade goods from India and the rest of Asia through the Ottomans (Saracens) by land. They felt no need to explore for alternate sea routes to "India."
I'd say that instead of the weakness of Morocco, the strength of Iberia at the end of XV century is the cause of the exploration of the new world.
For centuries Spain and Portugal had been fighting against the islamic kindoms in the peninsula. So by the time they liberated the peninsula they started to look for other challenges.
Actually, once Portugal ended its conquest of the peninsula and liberated from spanish influence (1383), they invaded Morocco, by taking Ceuta (1415). Later Spain did the same, they defeated Granada in the peninsula (1492) and later invaded Melilla in north Africa (1497). Both countries started their naval exploration once they liberated (either foreign influence or muslim kindoms) their respective territories.
Hence, Morocco during the XV and XVI centuries was under a strong pressure from Spain and Portugal. By not being able to sustain its own territory it was also incapable to create an armada capable to explore the world or repel the invaders.
This question seems to be premised on the false assumption that the Europeans tried to explore and conquer the New World. As alluded to in some of the comments and other answers, the exploration and subsequent conquest of the New World was essentially an accident. As is fairly common knowledge, the initial expeditions by Europeans sailing west were an attempt to reach Asia, bypassing the Middle East and the Ottoman Empire that sat between Europe and the lucrative trade goods coming out of the east. If European explorers had a better idea about the actual size of the Earth, they wouldn't have bothered trying to get to Asia by sailing west, and wouldn't have found the New World while trying to reach Asia. (They might have discovered it later on, but probably would have taken a different, more northerly route.)
While there are plenty of reasons that Morocco didn't launch exploration and trade expeditions like the Europeans did (which seems to be well-covered by the other answers), the question is based on a false premise. The Europeans never intended to explore and conquer the New World, so asking why someone else didn't misses the fundamental point that no one did.
this was asked on quora. good answers there
One of the primary reasons was that Christian Europeans did not have access to the trade routes running through Egypt or the Ottoman empire to the spices of India and China; Muslim Morocco, on the other hand, had a much more amicable relationship with the Ottomans and Egyptians, having access to the Barbary slave trade as well as all of the other more direct routes to the East.
In 1601, Sultan Ahmed was planning to send a colonial expedition to North America to build a Moroccan settlement, he informed the British of his intentions to avoid any disputes. But just as he was going to send the expedition, he died in 1603. His Sons immediately started a civil war