McDonnell said in his last State of the Commonwealth address—an annual political event in Virginia—that he'd broken no laws and gave no one special treatment. But he conceded in the speech to assembled members of the state House and Senate that his actions left an "adverse public impression."
The governor is currently under federal and state investigation for accepting thousands of dollars' worth of gifts from a former chief executive of Star Scientific Inc., a dietary supplement maker. McDonnell has not been charged with any crime.
He said he was "deeply sorry" for the pain he had caused the state.
McDonnell's speech to Virginia's General Assembly came on the first day of the 2014 legislative session. His successor, Democratic Gov.-elect Terry McAuliffe, is to be sworn in Saturday.
McDonnell's annual address to lawmakers was one of his last opportunities while in office to define his legacy. He focused much of his address on Virginia's economic growth, saying the state logged a net gain of 177,000 new jobs on his watch.
McDonnell claimed his strong economic stewardship also helped boost the state government's reserves from $295 million to more than $1 billion. He also cited the first major overhaul of the state's highway and transit funding scheme since 1986 as another achievement together with lawmakers—securing billions of dollars in funding for projects in the coming years.
A year ago, McDonnell's was an ascendant political star in the Republican Party. He had led the influential Republican Governors Association in 2011 and was being watched as a popular governor in a swing state near the nation's capital. But he leaves office amid unresolved investigations, his political future unclear.
Despite the gifts scandal, McDonnell remains popular with many in the Virginia legislature, where he'd served as a delegate before being elected the state's attorney general and then governor.
"I hope history will treat him kindly and with the respect and honor he deserves," said Sen. Walter Stosch, R-Henrico.
McDonnell had previously apologized for his actions related to Williams, but Wednesday was his first opportunity to do so directly to the General Assembly.
Speaking to reporters after his speech, McDonnell said it was "a good and wholesome and proper thing to do."
The apology was well received by legislators from both parties.
"I thought the apology was heartfelt and it was appropriate," said state Sen. A. Donald McEachin, D-Henrico. "As someone who believes in redemption, I hope the people of Virginia will join me and others in forgiving him."
Associated Press writer Larry O'Dell in Richmond contributed to this report.