Microsoft SQL Server provides a variety of different options to monitor deadlocks. This includes Trace flags 1204 and 1222, SQL Profiler trace events, Extended Events and Event Notifications. Of these options Extended Events are the most efficient, lowest impact method for capturing deadlock information. Extended Events infrastructure is built directly into SQL Server and so can easily be managed with T-SQL.
Check out my article here in which I discussed how we can use Extended Events to capture deadlocks on SQL Server.
This article is published on SQL-SERVER-PERFORMANCE.COM.