Rooney apologised for his “unforgivable lack of judgment” in a statement issued after he entered his guilty plea at Stockport Magistrates’ Court, near Manchester in northwest England.
The 31-year-old was arrested in the early hours of September 1 while driving over the prescribed alcohol limit in the north-western county of Cheshire.
Television footage showed him arriving at court on Monday wearing a dark suit.
In addition to the two-year driving ban, Rooney was ordered to perform 100 hours of unpaid work as part of a 12-month community order, the PA reported.
“I want publicly to apologise for my unforgivable lack of judgment in driving while over the legal limit. It was completely wrong,” Rooney said in a statement.
Rooney announced in August he was retiring from national team duty, ending a 14-year stint in which he became England’s top scorer with 53 goals.
In July, Rooney returned to Everton, his boyhood club, after 13 years with Manchester United.
“I have already said sorry to my family, my manager and chairman and everyone at Everton FC. Now I want to apologise to all the fans and everyone else who has followed and supported me throughout my career,” Rooney said.