The 33-year-old former Manchester United striker rejuvenated the MLS during a short-lived spell in the US but has decided to return to England before the end of his £2.8m-per-year contract which ran until 2021.
Rooney flew to the UK this week to finalise terms with Derby, while representatives of the club travelled to the US to make a deal with DC.
“I remain fully focused on giving my all for the team for the rest of this season and repaying the support shown by the Black-and-Red faithful by hopefully delivering an MLS Cup to Audi Field,” Rooney told the club’s official website.
“My time in Major League Soccer is something I will always be proud of. The supporters in the Screaming Eagles, Barra Brava and District Ultras have made my time in America so enjoyable.
“While the decision to move home was a tough one, family is everything to us and we make this change to be closer to the ones we love back in England. The opportunity to go back home and start the next step of my career in coaching was the factor that made my mind up. I would like to thank everyone at D.C. United for the incredible support my family and I have received over my two seasons at the club.”
Newly appointed Derby manager Philip Cocu, who replaced Frank Lampard this summer, added: “Wayne Rooney is an extremely talented and top-class footballer.
“It is an exciting prospect for him to be joining Derby County and he can bring so much to this squad, both on and off the pitch. He has enjoyed a wonderful career, both in club football and for England, and he still has so much to give as well.
“His credentials speak for themselves. But to have a player with his leadership, skill, experience, character and work ethic will be huge for us. He knows what it takes to succeed as a player and I have no doubt he will have a positive impact right across the club.
“The inspiration and motivation this can generate is massive for all of our players from the first team right through to the youngsters in the Academy. It is entirely in keeping with, and in support of, the club’s philosophy and approach.“I am looking forward to working with Wayne from the start of next year and welcoming him to the club.”