Unknown. Maybe from maluco (“moluccan”)- see Moluccas - or from a diminutive of malo.
Practice speaking and memorizing "maluco" and many other words and sentences in Portuguese.