You have an IC and probably OOC problem. Your player is not a criminal, but their character is.

Most civilized lands and societies don't tolerate open murderhobos. Enforce the consequences-if the character plays stupid games, they win stupid prizes. If I was the DM, this kind of murderhobo would have been arrested or killed long ago. Heck, if I am a player and I see this crap(and the campaign is not about us all being murderhobos, or evil vagrants, or some other reason the entire party is doing this) I get pretty miffed and speak out. Enforce the consequences of their actions, going out of your way so only the murderhobo gets the rewarsds

The bigger problem is the one out of character, but also somewhat easier to solve/prevent. Some players do this kind of thing for attention, a few do it to truly roleplay, but most do it because they like hack and slash. The easiest way to prevent this is give them combat early and often-try to start sessions with it, even if it is just some random encounter so they can quench some of their bloodlust. Lead them away from civilized lands to go kill undead, monster races, evil outsiders and whatever the heck society gives 2 thumbs up to stab and rip to shreds.
What is worse is that these actions can damn the party and waste session time. The party gets put in jail with the murderhobo, and worse is that they have to sit there, possibly for a long time, doing nothing as players as you have to cater to the player playing by themselves. Don't let them do this-it fuels the attention and reinforces the behavior. A ttRPG is a group game, and going solo to commit actions that are not within the party goal is a major no no. You never split the party, and that is exactly what this player is doing.

So, talk to the player and tell them that if everyone was on board to hack the town apart and it was a group effort, that is okay. Their behavior is wrong as a player because it goes against the group, and risky as a character because civilized societies frown on murderhobodom. I would explain this in detail and tell them that if they continue in character, their character is going to die(or be jailed, tried, and executed) and they will roll a new one. If they continue doing this as a player, they have no place in the group(again, going against the group is the major wrong action, not killing an NPC). After this, give them a chance to stop being a murderhobo-in exchange, you will wipe the slate clean of their past murderhobo, anti teamwork ways.