With a very small and complicated number of exceptions, dueling has always been illegal since the development of the concept of the duel of honor in Early Modern Italy (as compared to the judicial duel or trial by battle which far from being illegal, were an integrated part of the legal system). I've written on these issues before in several answers which you can find here.