Although Malaysia was formed in 1963, its history dates back during the Sultanate of Malacca in the 14th century. During the peak of its era, the sultanate was a very strong empire: its land covered a part of the Sumatra Island of Indonesia and peninsular Malaysia including Singapore. Much of its success was due to the presence of the Malacca strait which was the main route that connected the West to the East. It was during this period that the Malayisation of the region took place. Islam played a huge role in this process and its influence can be seen until now. For example, the religion itself which is now the primary religion in Malaysia and the introduction of the Jawi script and Malay language.
From the capture of Malacca by the Portuguese (1511) to decades of British settlement in the region to three years of suffering during the Japanese occupation (1942-1945), the formation of Malaysia was a tough job. After years of seeking independence from Britain, the Federation of Malaya was formed on the 31st of August 1957. To stop further spread of communism within the member nations, Sabah, Sarawak, Singapore, and the Federation of Malaya united and a new country named Malaysia was born on the 16th of September 1963. Although Malaysia was formed 6 years later, the 31st of August 1957 marks the official day of independence for the nation. Unlike many other countries who gained independence by means of war and bloodshed, the formation of Malaysia was unique as it was a result of negotiation and hard work of many people.
Further reading: http://lostislamichistory.com/sultanate-of-malacca/