Actually in the beginning Korea much poorer, for example in 1961 Malaysia had per capita income $215. South Korea had 81. So Malaysia is 2 and half times richer than Korea.
Today is exactly reverse. Korea have $20000 per capita income, Malaysia has less than $8000. Korea now is 2 and half times richer.
This thing was never simple but if you one line answer, Korea had achieved more than Malaysia have because they make sure they deal national capability in the form international standard company, well train workers, high standard engineer and so on. And Malaysia has unfortunately rely mostly on foreign company and has not develop the capablility as much.
Prof. Ha-Joon Chang for BFM