Speaking to The New Yorker magazine, he said it was wrong to think legalising the drug would be “a panacea” that could solve many social problems.
Mr Obama was referring to recent legalisation of marijuana in the states of Colorado and Washington.
He has previously admitted using the drug when he was young.
“As has been well documented, I smoked pot as a kid, and I view it as a bad habit and a vice, not very different from the cigarettes that I smoked as a young person up through a big chunk of my adult life,” Mr Obama said.
But he added that in terms of its impact on the individual consumer “I don’t think it is more dangerous than alcohol”.
He also said that poor people – many of them African Americans and Latinos – were disproportionately punished for marijuana use, whereas middle-class users mostly escaped harsh penalties.