Chicago Mayor Rahm Emanuel, the former White House chief of staff, told CNBC on Thursday he gave President Barack Obama a "contrary opinion" on the early stages of the Affordable Care Act, which debuted with a glitch-ridden website and troubled exchanges.

"He asked for my opinion," Emanuel said during an interview on "Squawk Box." "I gave it to him and why I thought we should do something slightly different."

Pressed on whether he thought the White House should have listened to his more incremental approach for health-care reform, Emanuel praised the president for seeking out opposing views as they hammered out what would later become known as Obamacare.



Read MoreRahm Emanuel, Steve Forbes, and Bill Ford on US manufacturing comeback



Emanuel admitted that he challenged the president's approach, but would not go as far to say that the White House made a mistake by not listening to him.

"The president, to his credit, he was not scared to have contrary opinions," Emanuel said. "He, constantly during tough moments in passing that bill, asked me for my opinion, unvarnished."

Read MoreObamacare foot draggers: Get off dime or pay fine!

Emanuel also lauded the early effects of the Affordable Care Act, highlighting that its reforms have kept health costs in line with inflation for the past three years. In contrast, rising health-care costs ate up profitability in both the public and private sectors for at least a decade before that, he said.

Emanuel, who was White House chief of staff from 2009 to 2010, was elected mayor of Chicago in 2011.