No, using VPN is not illegal in using hacked version of mobile legends, but by any chance if you are using original version of the game, we don't recommend using any VPN because it ban your account.