If a ground wire is getting that hot, there is apparently a short circuit somewhere that is apparently not fuse protected. The path of highest resistance is getting hot which is likely why one wire is getting hot and melting the insulation but the large low resistance cable to the battery is not.
Has someone added a stereo system, alarm system, CB/Ham radio system, trailer brake controller, or similar? If so, check those systems to see if they are fuse protected.
The negative terminal on the battery is probably beat up from all the arcing. If the problem were with the battery you wouldn't have the sparking only when the cable is connected and the one ground wire wouldn't get hot because the short would be in or at the battery.
-Rod