Parameswara named Melaka after this tree because of a good omen
Parameswara founded Malacca around 1400. He was a Hindu Srivijayan prince and Sejarah Melayu mentioned that he laid claims of being descended from the Macedonian King Alexander the Great / Iskandar Zulkarnain, a common practice in ancient historical writing to link a person to a legendary or mythical figure as a way of extolling their greatness. When Parameswara became the ruler of Palembang, the Srivijaya Empire was already in decline. In 1390s, Majapahit sent thousands of ships to attack Palembang. Parameswara had fled his palace and eventually reached Temasek island which was headed by a Srivijayan descendent. However, Temasek had been a vassal of Majapahit since 1365. After several days, Parameswara was betrayed by his relative and he had to kill him. Parameswara then ruled Temasik for about 4 years, where he was finally attacked by the Majapahit armies when one of the ministers opened the gates for Majapahit armies to attack the palace. Parameswara fled north to Muar before founding Melaka in 1400. In 1409, Parameswara assumed the title Sultan Iskandar Shah due to his marriage to a princess from Pasai. His marriage to the Muslim princess encouraged a number of his subjects to embrace Islam. According to the Sejarah Melayu, legend has it that the king saw a mouse deer outwit a dog when he was resting under the Melaka tree. He took what he saw as a good omen and decided to establish a capital for his kingdom there. Today, the mouse deer is part of modern Malacca's coat of arms.
source of information : courtesy of wikipedia.org