Rooney departs after DC United failed to reach the MLS playoffs despite a 2-0 win over New York City FC in their final regular season game on Saturday.
The former England international had been in charge of DC since July 2022.
Rooney also played for DC United at the twilight of his career, making 52 appearances and scoring 25 goals.
DC chief executive and co-chairman Jason Levien said: "We have spoken with Wayne and agreed it is best for us to part ways at this time.
"This decision creates the avenue for our next general manager to have the full opportunity to impart a new philosophy and structure onto our sporting operations, which begins with the critical identification of a head coach who will best align with this.
"We are grateful to Wayne Rooney for all he has done for our club and for soccer in the nation's capital, first as a DC United player and captain and most recently as our coach."
"It's the right time," Rooney said, according to the Athletic.
"I've done everything I can to get this club into the playoffs. It's not a single thing that's happened. It's about timing. What lies ahead, I don't know. I've seen a lot of reports in the media. I'm going back with nothing lined up."
Rooney has been strongly linked with a move to Birmingham City in the Championship.