How would you discourage players/the party from killing everyone and everything they could otherwise get away with killing?
Firstly, stop giving out XP for monsters slain. As long as your game rewards a particular behaviour, that's what you'll get.
Are they killing innocent people or dangerous monsters? If it's the first, make them face the "Flaming Fist" (use your own name). They were a group of mercenaries in the Baldur's Gate setting. They had a rep for being dangerous warriors (so, higher level than the PCs), had access to resources like carrier pigeons (for carrying descriptions), mysterious mystery-solving rituals (written in different codes each time; you don't want to hand out that as treasure) and a worldwide network of agents who could use well-guarded sending items to communicate with groups wherever the PCs went. In that setting they seemed to focus only on villainous PCs who went around committing crimes (as lowly as breaking into and looting peoples' homes).
And tell your players if they play evil PCs they have to retire those characters, handing over their character sheets, and start over (or even leave the group).
If they're only killing monsters, punishment won't work, only discussion. Maybe they think every orc is evil or something.

(Dungeons & Dragons)
Rulebook featuring "high magic" options, including a host of new spells.