Rooney made the announcement Tuesday on the team website. Derby County agreed to a deal with Rooney until the summer of 2021, with an option for an additional year.
"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 said in a news release. "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."
D.C. United co-chairmen Steve Kaplan and Jason Levien said they spoke with Rooney and understand his "difficult situation of being so far away from his family." They also called the move the "best decision for all parties."
"Wayne Rooney is an extremely talented and top-class footballer," Derby County manager Phillip Cocu said in a news release.
"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."
Rooney, 33, will become a club ambassador for D.C. United. Financial terms of his deal with Derby County are undisclosed. Rooney has 23 goals and 14 assists in 43 matches with D.C. United.