So I was playing with some friends on my minecraft server and an idiot decided to spawn this: 
Now the server is lagging like hell and it's impossible to play. I am not able to kill it with a sword either. So please, how do I kill this?
44 Answers
Solution using commands
If you have access to commands and are playing Minecraft 1.8 (snapshot 14w02a or newer), you can use them to get rid of any mob.
/kill @e[r=50,type=slime] Kills all slimes in a 50m radius around the player. In the case of slimes, you might have to repeat the command, since I am unsure if it still splits up into smaller slimes. Alternatively
/tp @e[r=50,type=slime] ~ ~-200 ~ teleports all slimes 200 blocks downward into the void, where splitting is no problem.
Ok, it's solved. We used lava to drown that thing. It's dead now.
The hitbox is actually not out at the surface of the slime. I spawned one of these in a test world a while ago and found that the hitbox is near the center of the slime, about where the darker inner cube starts, and only within about 3-4 blocks of the ground. The only way to kill it with a sword is to be in creative mode so you can fly inside the slime without taking damage (which knocks you back), and hit it that way. It takes forever though, because it has size^2 health. I believe I finally just switched to peaceful to get rid of it, after hacking at it for like 20 minutes.
/kill @e{type=slime} No space in @e and {type=slime}