If you have hacked a Pokemon, then there just isn't a way to "legalize it". You can probably fine some loopholes that allow you to move it into Pokemon home, but honestly, why would you? EDIT: Removing illegal moves works, (i think) (TY to ATG)