On June 7, 2018, Trotz and the Capitals defeated the Vegas Golden Knights in five games in the Stanley Cup Finals, and won his first Stanley Cup for the first time as head coach after 19 seasons, the longest such wait in NHL history. On June 18, 2018, Trotz resigned from the Capitals as their head coach due to a contract dispute.
On June 21, 2018, the New York Islanders hired Trotz as head coach. On March 5, 2019, Trotz earned his 800th career win when the Islanders defeated the Ottawa Senators 5–4 after a shootout In the Stanley Cup playoffs, the Islanders swept the Pittsburgh Penguins in the first round and then were swept by the Carolina Hurricanes in the second round. On June 19, 2019, Trotz won the Jack Adams Award for a second time.